Documentation ¶
Index ¶
- Variables
- func RegisterEncoder(enc Encoder)
- func RegisterServer(servers ...Server)
- func Run() error
- type Call
- type Client
- type ClientOption
- type CompressType
- type Discovery
- type Encoder
- type Message
- type MessageContentType
- type MessageType
- type ReadData
- type Registry
- type Server
- type ServerHTTP
- type ServerTCP
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func RegisterEncoder ¶
func RegisterEncoder(enc Encoder)
func RegisterServer ¶
func RegisterServer(servers ...Server)
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(name string, options ...ClientOption) *Client
func (*Client) BroadcastCall ¶
type ClientOption ¶
type ClientOption func(client *Client)
func WithClientOptionHosts ¶
func WithClientOptionHosts(hosts ...string) ClientOption
type Encoder ¶
type Encoder interface { Marshal(v any) ([]byte, error) Unmarshal(bs []byte, v any) error Name() string }
func GetEncoder ¶
type Message ¶
type Message struct { BodyLen int32 Type MessageType ContentType MessageContentType CompressType CompressType Data *pb.Message }
type MessageContentType ¶
type MessageContentType uint8
const ( MessageContentType_Json MessageContentType = 0x01 MessageContentType_Proto MessageContentType = 0x02 )
type MessageType ¶
type MessageType uint8
const ( MessageType_Ping MessageType = 0x10 MessageType_Data MessageType = 0x20 )
type ServerHTTP ¶
type ServerHTTP struct {
// contains filtered or unexported fields
}
func (*ServerHTTP) Addr ¶
func (srv *ServerHTTP) Addr() string
func (*ServerHTTP) Name ¶
func (srv *ServerHTTP) Name() string
func (*ServerHTTP) ServeHTTP ¶
func (srv *ServerHTTP) ServeHTTP(rw http.ResponseWriter, req *http.Request)
func (*ServerHTTP) Start ¶
func (srv *ServerHTTP) Start() error
func (*ServerHTTP) Stop ¶
func (srv *ServerHTTP) Stop() error
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
protoc-gen-microgo
protoc-gen-go-fifi is a plugin for the Google protocol buffer compiler to generate Go code.
|
protoc-gen-go-fifi is a plugin for the Google protocol buffer compiler to generate Go code. |
example
|
|
internal
|
|
utils
|
|
Click to show internal directories.
Click to hide internal directories.