serv

package
v0.0.0-...-69995ca Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: Apache-2.0 Imports: 18 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) kim.Dialer

Types

type Handler

type Handler struct {
	ServiceID string
	AppSecret string
}

Handler Handler

func (*Handler) Accept

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

Accept this connection

func (*Handler) Disconnect

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

Disconnect default listener

func (*Handler) Receive

func (h *Handler) Receive(ag kim.Agent, payload []byte)

Receive default listener

type RouteSelector

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

RouteSelector RouteSelector

func NewRouteSelector

func NewRouteSelector(configPath string) (*RouteSelector, error)

func (*RouteSelector) Lookup

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

Lookup a server

type TcpDialer

type TcpDialer struct {
	ServiceId string
}

func (*TcpDialer) DialAndHandshake

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

DialAndHandshake(context.Context, string) (net.Conn, error)

Jump to

Keyboard shortcuts

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