Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallRequest ¶
type CallRequest struct { // name to append to the message e.g Alice Name string `json:"name,omitempty"` }
type CallResponse ¶
type CallResponse struct { // message including name e.g Hello Alice Message string `json:"message,omitempty"` }
type Helloworld ¶ added in v0.6.0
type Helloworld interface { Call(*CallRequest) (*CallResponse, error) Stream(*StreamRequest) (*StreamResponseStream, error) }
type HelloworldService ¶
type HelloworldService struct {
// contains filtered or unexported fields
}
func NewHelloworldService ¶
func NewHelloworldService(token string) *HelloworldService
func (*HelloworldService) Call ¶
func (t *HelloworldService) Call(request *CallRequest) (*CallResponse, error)
Return a personalised Hello message
func (*HelloworldService) Stream ¶
func (t *HelloworldService) Stream(request *StreamRequest) (*StreamResponseStream, error)
Stream a personalised Hello message
type StreamRequest ¶
type StreamResponse ¶
type StreamResponse struct { // message including name e.g Hello Alice Message string `json:"message,omitempty"` }
type StreamResponseStream ¶ added in v0.2.0
type StreamResponseStream struct {
// contains filtered or unexported fields
}
func (*StreamResponseStream) Recv ¶ added in v0.2.0
func (t *StreamResponseStream) Recv() (*StreamResponse, error)
Click to show internal directories.
Click to hide internal directories.