package apiproto import "time" type TestServer struct { data map[string]string } func (t *TestServer) getChannelName() string { return "test" } func (t *TestServer) getInterval() time.Duration { return time.Second } func (t *TestServer) allMsgData(params map[string]string) []byte { return []byte(`{"input": "hello world"}`) } func (t *TestServer) onTick() []TopicMsg { msg := TopicMsg{t.getChannelName(), []byte(`{"input": "hello from GRPC"}`)} return []TopicMsg{msg} }