rts-sim-testing-service/grpcproto/test_server.go
2023-07-31 08:41:42 +08:00

25 lines
483 B
Go

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}
}