Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Edge ¶
type Edge interface { // Edge can directly Publish Message or Call RPC RPCMessager // Edge can manage(create, list...) streams from or to a Service Multiplexer // Edge is a net.Listener, actually it's wrapper of Multiplexer // The Accept function is a wrapper from AccetpStream // The Addr is a wrapper from LocalAddr net.Listener // Meta EdgeID() uint64 Close() error }
func NewNoRetryEdge ¶ added in v1.1.0
func NewNoRetryEdge(dialer Dialer, opts ...EdgeOption) (Edge, error)
type EdgeOption ¶
type EdgeOption func(*edgeOption)
func OptionEdgeLog ¶
func OptionEdgeLog(logger Logger) EdgeOption
func OptionEdgeMeta ¶
func OptionEdgeMeta(meta []byte) EdgeOption
func OptionServiceBufferSize ¶ added in v1.1.0
func OptionServiceBufferSize(read, write int) EdgeOption
type Messager ¶
type Messager interface { NewMessage(data []byte) geminio.Message // Publish a message to specific topic Publish(ctx context.Context, topic string, msg geminio.Message) error // Publish async a message to specific topic PublishAsync(ctx context.Context, topic string, msg geminio.Message, ch chan *geminio.Publish) (*geminio.Publish, error) Receive(ctx context.Context) (geminio.Message, error) }
Messager is topic oriented
type Multiplexer ¶
type Multiplexer interface { // Open a stream to a specific service OpenStream(serviceName string) (geminio.Stream, error) AcceptStream() (geminio.Stream, error) ListStreams() []geminio.Stream }
Stream multiplexer
type RPCMessager ¶
type RPCer ¶
type RPCer interface { NewRequest(data []byte) geminio.Request Call(ctx context.Context, method string, req geminio.Request) (geminio.Response, error) CallAsync(ctx context.Context, method string, req geminio.Request, ch chan *geminio.Call) (*geminio.Call, error) Register(ctx context.Context, method string, rpc geminio.RPC) error }
RPCer is method oriented
Click to show internal directories.
Click to hide internal directories.