intern

package
v0.0.0-...-8977607 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandlersDocs

func HandlersDocs(serverType string, services map[string]*component.Service, getPtrNames bool) (map[string]interface{}, error)

HandlersDocs returns a map from route to input and output

Types

type Link interface {
	GoLoop(kickInterval time.Duration, onReadHandler OnReadHandler)
	Write(data []byte) (int, error)
	Close() error
	RemoteAddr() net.Addr
}

type OnReadHandler

type OnReadHandler func(reader *iox.OctetsReader, err error)

type Route

type Route struct {
	SvType  string
	Service string
	Method  string
}

Route struct

func NewRoute

func NewRoute(server, service, method string) *Route

NewRoute creates a new route

func (*Route) Short

func (r *Route) Short() string

Short transforms the route into a string without the server type

func (*Route) String

func (r *Route) String() string

String transforms the route into a string

type TcpLink struct {
	// contains filtered or unexported fields
}
func NewTcpLink(conn net.Conn) *TcpLink

func (*TcpLink) Close

func (my *TcpLink) Close() error

Close closes the connection. Any blocked Read or Write operations will be unblocked and return errors.

func (*TcpLink) GoLoop

func (my *TcpLink) GoLoop(kickInterval time.Duration, onReadHandler OnReadHandler)

func (*TcpLink) RemoteAddr

func (my *TcpLink) RemoteAddr() net.Addr

RemoteAddr returns the remote address.

func (*TcpLink) Write

func (my *TcpLink) Write(data []byte) (int, error)
type WsLink struct {
	// contains filtered or unexported fields
}
func NewWsLink(conn net.Conn) *WsLink

func (*WsLink) Close

func (my *WsLink) Close() error

Close closes the connection. Any blocked Read or Write operations will be unblocked and return errors.

func (*WsLink) GoLoop

func (my *WsLink) GoLoop(kickInterval time.Duration, onReadHandler OnReadHandler)

func (*WsLink) RemoteAddr

func (my *WsLink) RemoteAddr() net.Addr

RemoteAddr returns the remote address.

func (*WsLink) Write

func (my *WsLink) Write(data []byte) (int, error)

Jump to

Keyboard shortcuts

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