router

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFoundHandler = errors.New("not found route path")
)

Functions

This section is empty.

Types

type Router

type Router struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewRouter

func NewRouter(wrappers []handler.WrapperHandler, err parcel.ErrorPackager) *Router

NewRouter create a new Router

func (*Router) Error

func (r *Router) Error() parcel.ErrorPackager

func (*Router) List

func (r *Router) List()

func (*Router) RCProcess

func (r *Router) RCProcess(c *context.Context, req chan *parcel.RocPacket, errs chan error) (
	chan proto.Message,
	chan error,
)

func (*Router) RRProcess

func (r *Router) RRProcess(c *context.Context, req *parcel.RocPacket, rsp *parcel.RocPacket) error

func (*Router) RSProcess

func (r *Router) RSProcess(c *context.Context, req *parcel.RocPacket) (chan proto.Message, chan error)

func (*Router) RegisterChannelHandler

func (r *Router) RegisterChannelHandler(service string, rc handler.ChannelHandler)

func (*Router) RegisterHandler

func (r *Router) RegisterHandler(method string, rr handler.Handler)

func (*Router) RegisterStreamHandler

func (r *Router) RegisterStreamHandler(method string, rs handler.StreamHandler)

Jump to

Keyboard shortcuts

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