serv

package
v0.0.0-...-e7f8777 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetaKeyApp     = "app"
	MetaKeyAccount = "account"
)

Variables

This section is empty.

Functions

func NewDialer

func NewDialer(serviceID string) qim.Dialer

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHander

func NewHander(serviceID, appSecret string, lg *zap.Logger) *Handler

func (*Handler) Accept

func (h *Handler) Accept(conn qim.Conn, timeout time.Duration) (string, qim.Meta, error)

Accept implements qim.Acceptor

func (*Handler) Disconnect

func (h *Handler) Disconnect(channelID string) error

Disconnect implements qim.StateListener

func (*Handler) Receive

func (h *Handler) Receive(agent qim.Agent, payload []byte)

Receive implements qim.MessageListener

type RouteSelector

type RouteSelector struct {
	// contains filtered or unexported fields
}

func NewRouteSelector

func NewRouteSelector(configPath string, lg *zap.Logger) (*RouteSelector, error)

func (*RouteSelector) Lookup

func (s *RouteSelector) Lookup(header *pkt.Header, srvs []qim.Service) string

Lookup implements container.Selector

type TcpDialer

type TcpDialer struct {
	ServiceID string
}

func (*TcpDialer) DialAndHandshake

func (d *TcpDialer) DialAndHandshake(ctx qim.DialerContext) (net.Conn, error)

DialAndHandshake implements qim.Dialer

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL