Documentation
¶
Index ¶
- Constants
- Variables
- func HasErrorFlag(flags uint8) bool
- func NewStockPricesPricesMap(size uint32) map[string]float64
- func NewStockPricesSuperWrapPricesMap(size uint32) map[string]*StockPricesWrapper
- func NewTestPotatoPricesMap(size uint32) map[string]Test
- func SetErrorFlag(flags uint8, error bool) uint8
- type Client
- type CloseError
- type Data
- type EchoService
- type EchoStreamClient
- type EchoStreamServer
- type MyMessage1
- type MyMessage1EnumAllowingAlias
- type MyMessage2
- type MyMessage2EnumNotAllowingAlias
- type Outer
- type OuterMiddleAA
- type OuterMiddleAAInner
- type OuterMiddleBB
- type OuterMiddleBBInner
- type RPCStreamOpen
- type Request
- type RequestCorpus
- type Response
- type Resulting
- type SampleMessage
- type SearchClient
- type SearchResponse
- type SearchResponseResult
- type SearchServer
- type Server
- func (s *Server) ServeConn(conn net.Conn)
- func (s *Server) SetConcurrency(concurrency uint64)
- func (s *Server) SetOnClosed(f func(*frisbee.Async, error)) error
- func (s *Server) SetPreWrite(f func()) error
- func (s *Server) Shutdown() error
- func (s *Server) Start(addr string) error
- func (s *Server) StartWithListener(listener net.Listener) error
- type SomeOtherMessage
- type StockPrices
- type StockPricesPricesMap
- type StockPricesSuperWrap
- type StockPricesSuperWrapPricesMap
- type StockPricesWrapper
- type Test
- type TestPotato
- type TestPotatoPricesMap
- type UploadClient
- type UploadServer
Constants ¶
View Source
const ( Potato = Test(0) Monkey = Test(1) )
View Source
const ( RequestUNIVERSAL = RequestCorpus(0) RequestWEB = RequestCorpus(1) RequestIMAGES = RequestCorpus(2) RequestLOCAL = RequestCorpus(3) RequestNEWS = RequestCorpus(4) RequestPRODUCTS = RequestCorpus(5) RequestVIDEO = RequestCorpus(6) )
View Source
const ( MyMessage1UNKNOWN = MyMessage1EnumAllowingAlias(0) MyMessage1STARTED = MyMessage1EnumAllowingAlias(1) MyMessage1RUNNING = MyMessage1EnumAllowingAlias(2) )
View Source
const ( MyMessage2UNKNOWN = MyMessage2EnumNotAllowingAlias(0) MyMessage2STARTED = MyMessage2EnumNotAllowingAlias(1) )
View Source
const ConnectionContextKey int = 1000
View Source
const StreamContextKey int = 1001
Variables ¶
View Source
var (
ErrDecodeNil = errors.New("cannot decode into a nil root struct")
)
Functions ¶
func HasErrorFlag ¶
func NewStockPricesPricesMap ¶
func NewStockPricesSuperWrapPricesMap ¶
func NewStockPricesSuperWrapPricesMap(size uint32) map[string]*StockPricesWrapper
func NewTestPotatoPricesMap ¶
func SetErrorFlag ¶
Types ¶
type Client ¶
type Client struct { *frisbee.Client EchoService *subEchoServiceClient }
type CloseError ¶
type CloseError struct {
// contains filtered or unexported fields
}
func NewCloseError ¶
func NewCloseError(err error) CloseError
func (CloseError) Error ¶
func (e CloseError) Error() string
type EchoService ¶
type EchoService interface { Echo(context.Context, *Request) (*Response, error) EchoStream(context.Context, *EchoStreamServer) error Testy(context.Context, *SearchResponse) (*StockPricesWrapper, error) Search(context.Context, *SearchResponse, *SearchServer) error Upload(context.Context, *UploadServer) error }
type EchoStreamClient ¶
type EchoStreamClient struct {
// contains filtered or unexported fields
}
func (*EchoStreamClient) CloseAndRecv ¶
func (x *EchoStreamClient) CloseAndRecv() (*Response, error)
func (*EchoStreamClient) CloseChannel ¶ added in v0.10.0
func (x *EchoStreamClient) CloseChannel() <-chan struct{}
func (*EchoStreamClient) CloseSend ¶
func (x *EchoStreamClient) CloseSend() error
func (*EchoStreamClient) Recv ¶
func (x *EchoStreamClient) Recv() (*Response, error)
func (*EchoStreamClient) Send ¶
func (x *EchoStreamClient) Send(m *Request) error
type EchoStreamServer ¶
type EchoStreamServer struct {
// contains filtered or unexported fields
}
func (*EchoStreamServer) CloseAndSend ¶
func (x *EchoStreamServer) CloseAndSend(m *Response) error
func (*EchoStreamServer) CloseChannel ¶ added in v0.10.0
func (x *EchoStreamServer) CloseChannel() <-chan struct{}
func (*EchoStreamServer) CloseSend ¶
func (x *EchoStreamServer) CloseSend() error
func (*EchoStreamServer) Recv ¶
func (x *EchoStreamServer) Recv() (*Request, error)
func (*EchoStreamServer) Send ¶
func (x *EchoStreamServer) Send(m *Response) error
type MyMessage1 ¶
type MyMessage1 struct {
// contains filtered or unexported fields
}
func NewMyMessage1 ¶
func NewMyMessage1() *MyMessage1
func (*MyMessage1) Decode ¶
func (x *MyMessage1) Decode(b []byte) error
func (*MyMessage1) Encode ¶
func (x *MyMessage1) Encode(b *polyglot.Buffer)
func (*MyMessage1) Error ¶
func (x *MyMessage1) Error(b *polyglot.Buffer, err error)
type MyMessage1EnumAllowingAlias ¶
type MyMessage1EnumAllowingAlias uint32
type MyMessage2 ¶
type MyMessage2 struct {
// contains filtered or unexported fields
}
func NewMyMessage2 ¶
func NewMyMessage2() *MyMessage2
func (*MyMessage2) Decode ¶
func (x *MyMessage2) Decode(b []byte) error
func (*MyMessage2) Encode ¶
func (x *MyMessage2) Encode(b *polyglot.Buffer)
func (*MyMessage2) Error ¶
func (x *MyMessage2) Error(b *polyglot.Buffer, err error)
type MyMessage2EnumNotAllowingAlias ¶
type MyMessage2EnumNotAllowingAlias uint32
type Outer ¶
type Outer struct { A *OuterMiddleAA B *OuterMiddleBB // contains filtered or unexported fields }
type OuterMiddleAA ¶
type OuterMiddleAA struct { Inner *OuterMiddleAAInner // contains filtered or unexported fields }
func NewOuterMiddleAA ¶
func NewOuterMiddleAA() *OuterMiddleAA
func (*OuterMiddleAA) Decode ¶
func (x *OuterMiddleAA) Decode(b []byte) error
func (*OuterMiddleAA) Encode ¶
func (x *OuterMiddleAA) Encode(b *polyglot.Buffer)
func (*OuterMiddleAA) Error ¶
func (x *OuterMiddleAA) Error(b *polyglot.Buffer, err error)
type OuterMiddleAAInner ¶
func NewOuterMiddleAAInner ¶
func NewOuterMiddleAAInner() *OuterMiddleAAInner
func (*OuterMiddleAAInner) Decode ¶
func (x *OuterMiddleAAInner) Decode(b []byte) error
func (*OuterMiddleAAInner) Encode ¶
func (x *OuterMiddleAAInner) Encode(b *polyglot.Buffer)
func (*OuterMiddleAAInner) Error ¶
func (x *OuterMiddleAAInner) Error(b *polyglot.Buffer, err error)
type OuterMiddleBB ¶
type OuterMiddleBB struct { Inner *OuterMiddleBBInner // contains filtered or unexported fields }
func NewOuterMiddleBB ¶
func NewOuterMiddleBB() *OuterMiddleBB
func (*OuterMiddleBB) Decode ¶
func (x *OuterMiddleBB) Decode(b []byte) error
func (*OuterMiddleBB) Encode ¶
func (x *OuterMiddleBB) Encode(b *polyglot.Buffer)
func (*OuterMiddleBB) Error ¶
func (x *OuterMiddleBB) Error(b *polyglot.Buffer, err error)
type OuterMiddleBBInner ¶
func NewOuterMiddleBBInner ¶
func NewOuterMiddleBBInner() *OuterMiddleBBInner
func (*OuterMiddleBBInner) Decode ¶
func (x *OuterMiddleBBInner) Decode(b []byte) error
func (*OuterMiddleBBInner) Encode ¶
func (x *OuterMiddleBBInner) Encode(b *polyglot.Buffer)
func (*OuterMiddleBBInner) Error ¶
func (x *OuterMiddleBBInner) Error(b *polyglot.Buffer, err error)
type RPCStreamOpen ¶
type RPCStreamOpen struct {
// contains filtered or unexported fields
}
func (*RPCStreamOpen) Decode ¶
func (x *RPCStreamOpen) Decode(b []byte) error
func (*RPCStreamOpen) Encode ¶
func (x *RPCStreamOpen) Encode(b *polyglot.Buffer)
func (*RPCStreamOpen) Error ¶
func (x *RPCStreamOpen) Error(b *polyglot.Buffer, err error)
type Request ¶
type Request struct { Message string Corpus RequestCorpus // contains filtered or unexported fields }
func NewRequest ¶
func NewRequest() *Request
type RequestCorpus ¶
type RequestCorpus uint32
type Response ¶
func NewResponse ¶
func NewResponse() *Response
type Resulting ¶
type Resulting struct { Url string Title string Snippets []string // contains filtered or unexported fields }
func NewResulting ¶
func NewResulting() *Resulting
type SampleMessage ¶
func NewSampleMessage ¶
func NewSampleMessage() *SampleMessage
func (*SampleMessage) Decode ¶
func (x *SampleMessage) Decode(b []byte) error
func (*SampleMessage) Encode ¶
func (x *SampleMessage) Encode(b *polyglot.Buffer)
func (*SampleMessage) Error ¶
func (x *SampleMessage) Error(b *polyglot.Buffer, err error)
type SearchClient ¶
type SearchClient struct {
// contains filtered or unexported fields
}
func (*SearchClient) CloseChannel ¶ added in v0.10.0
func (x *SearchClient) CloseChannel() <-chan struct{}
func (*SearchClient) Recv ¶
func (x *SearchClient) Recv() (*Response, error)
type SearchResponse ¶
type SearchResponse struct { Results []*SearchResponseResult Results2 []*SearchResponseResult Snippets []string Snippets2 []string // contains filtered or unexported fields }
func NewSearchResponse ¶
func NewSearchResponse() *SearchResponse
func (*SearchResponse) Decode ¶
func (x *SearchResponse) Decode(b []byte) error
func (*SearchResponse) Encode ¶
func (x *SearchResponse) Encode(b *polyglot.Buffer)
func (*SearchResponse) Error ¶
func (x *SearchResponse) Error(b *polyglot.Buffer, err error)
type SearchResponseResult ¶
type SearchResponseResult struct { Url string Title string Snippets []string // contains filtered or unexported fields }
func NewSearchResponseResult ¶
func NewSearchResponseResult() *SearchResponseResult
func (*SearchResponseResult) Decode ¶
func (x *SearchResponseResult) Decode(b []byte) error
func (*SearchResponseResult) Encode ¶
func (x *SearchResponseResult) Encode(b *polyglot.Buffer)
func (*SearchResponseResult) Error ¶
func (x *SearchResponseResult) Error(b *polyglot.Buffer, err error)
type SearchServer ¶
type SearchServer struct {
// contains filtered or unexported fields
}
func (*SearchServer) CloseAndSend ¶
func (x *SearchServer) CloseAndSend(m *Response) error
func (*SearchServer) CloseChannel ¶ added in v0.10.0
func (x *SearchServer) CloseChannel() <-chan struct{}
func (*SearchServer) CloseSend ¶
func (x *SearchServer) CloseSend() error
func (*SearchServer) Send ¶
func (x *SearchServer) Send(m *Response) error
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) SetConcurrency ¶ added in v0.10.0
func (*Server) SetOnClosed ¶
func (*Server) SetPreWrite ¶ added in v0.10.0
type SomeOtherMessage ¶
type SomeOtherMessage struct { Result *SearchResponseResult // contains filtered or unexported fields }
func NewSomeOtherMessage ¶
func NewSomeOtherMessage() *SomeOtherMessage
func (*SomeOtherMessage) Decode ¶
func (x *SomeOtherMessage) Decode(b []byte) error
func (*SomeOtherMessage) Encode ¶
func (x *SomeOtherMessage) Encode(b *polyglot.Buffer)
func (*SomeOtherMessage) Error ¶
func (x *SomeOtherMessage) Error(b *polyglot.Buffer, err error)
type StockPrices ¶
type StockPrices struct { Prices StockPricesPricesMap // contains filtered or unexported fields }
func NewStockPrices ¶
func NewStockPrices() *StockPrices
func (*StockPrices) Decode ¶
func (x *StockPrices) Decode(b []byte) error
func (*StockPrices) Encode ¶
func (x *StockPrices) Encode(b *polyglot.Buffer)
func (*StockPrices) Error ¶
func (x *StockPrices) Error(b *polyglot.Buffer, err error)
type StockPricesPricesMap ¶
func (StockPricesPricesMap) Encode ¶
func (x StockPricesPricesMap) Encode(b *polyglot.Buffer)
type StockPricesSuperWrap ¶
type StockPricesSuperWrap struct { Prices StockPricesSuperWrapPricesMap // contains filtered or unexported fields }
func NewStockPricesSuperWrap ¶
func NewStockPricesSuperWrap() *StockPricesSuperWrap
func (*StockPricesSuperWrap) Decode ¶
func (x *StockPricesSuperWrap) Decode(b []byte) error
func (*StockPricesSuperWrap) Encode ¶
func (x *StockPricesSuperWrap) Encode(b *polyglot.Buffer)
func (*StockPricesSuperWrap) Error ¶
func (x *StockPricesSuperWrap) Error(b *polyglot.Buffer, err error)
type StockPricesSuperWrapPricesMap ¶
type StockPricesSuperWrapPricesMap map[string]*StockPricesWrapper
func (StockPricesSuperWrapPricesMap) Encode ¶
func (x StockPricesSuperWrapPricesMap) Encode(b *polyglot.Buffer)
type StockPricesWrapper ¶
type StockPricesWrapper struct { SPrices []*StockPrices // contains filtered or unexported fields }
func NewStockPricesWrapper ¶
func NewStockPricesWrapper() *StockPricesWrapper
func (*StockPricesWrapper) Decode ¶
func (x *StockPricesWrapper) Decode(b []byte) error
func (*StockPricesWrapper) Encode ¶
func (x *StockPricesWrapper) Encode(b *polyglot.Buffer)
func (*StockPricesWrapper) Error ¶
func (x *StockPricesWrapper) Error(b *polyglot.Buffer, err error)
type TestPotato ¶
type TestPotato struct { Prices TestPotatoPricesMap // contains filtered or unexported fields }
func NewTestPotato ¶
func NewTestPotato() *TestPotato
func (*TestPotato) Decode ¶
func (x *TestPotato) Decode(b []byte) error
func (*TestPotato) Encode ¶
func (x *TestPotato) Encode(b *polyglot.Buffer)
func (*TestPotato) Error ¶
func (x *TestPotato) Error(b *polyglot.Buffer, err error)
type TestPotatoPricesMap ¶
func (TestPotatoPricesMap) Encode ¶
func (x TestPotatoPricesMap) Encode(b *polyglot.Buffer)
type UploadClient ¶
type UploadClient struct {
// contains filtered or unexported fields
}
func (*UploadClient) CloseAndRecv ¶
func (x *UploadClient) CloseAndRecv() (*Response, error)
func (*UploadClient) CloseChannel ¶ added in v0.10.0
func (x *UploadClient) CloseChannel() <-chan struct{}
func (*UploadClient) CloseSend ¶
func (x *UploadClient) CloseSend() error
func (*UploadClient) Send ¶
func (x *UploadClient) Send(m *Data) error
type UploadServer ¶
type UploadServer struct {
// contains filtered or unexported fields
}
func (*UploadServer) CloseAndSend ¶
func (x *UploadServer) CloseAndSend(m *Response) error
func (*UploadServer) CloseChannel ¶ added in v0.10.0
func (x *UploadServer) CloseChannel() <-chan struct{}
func (*UploadServer) CloseSend ¶
func (x *UploadServer) CloseSend() error
func (*UploadServer) Recv ¶
func (x *UploadServer) Recv() (*Data, error)
Click to show internal directories.
Click to hide internal directories.