gproto

package
v0.0.0-...-b6b8bdf Latest Latest
Warning

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

Go to latest
Published: May 2, 2019 License: MIT Imports: 3 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IMessageQueueType = reflect.TypeOf((*IMessageQueue)(nil)).Elem()
View Source
var IMsgProcessorType = reflect.TypeOf((*IMsgProcessor)(nil)).Elem()
View Source
var INetChannelType = reflect.TypeOf((*INetChannel)(nil)).Elem()
View Source
var IRouteDelegateType = reflect.TypeOf((*IRouteDelegate)(nil)).Elem()
View Source
var IRouteType = reflect.TypeOf((*IRoute)(nil)).Elem()

Functions

This section is empty.

Types

type FProcessor

type FProcessor = func(interface{}, interface{}, interface{}) interface{}

type ICoder

type ICoder interface {
	Code(data interface{}) interface{}
}

type IDecoder

type IDecoder interface {
	Decode(data interface{}) interface{}
}

type IEncoder

type IEncoder interface {
	Encode(data interface{}) interface{}
}

type IMesageQueueName

type IMesageQueueName interface {
	Name() string
}

type IMessageQueueBundle

type IMessageQueueBundle interface {
	Push(id interface{}, msg interface{}) bool
	Pop(id interface{}, num int) []interface{}
}

type IMessageQueueFactory

type IMessageQueueFactory interface {
	gioc.IPriority
	GetMessageQueue(group, id string) IMessageQueue
}

type IMessageQueueReader

type IMessageQueueReader interface {
	Pop(num int) []string
}

type IMessageQueueWriter

type IMessageQueueWriter interface {
	Push(msg string) bool
}

type IMsgProcessor

type IMsgProcessor interface {
	ProcessMsg(msg interface{}) bool
}

type INetChannel

type INetChannel interface {
	IMsgProcessor
	// 设置编码器
	SetEncoder(encoder IEncoder)
	// 发送一个数据
	Send(data interface{})
	// 关闭
	Close() error
	IsActive() bool
	RemoteAddr() net.Addr
	LocalAddr() net.Addr
}

type INetConnector

type INetConnector interface {
	Connect(host string) INetChannel
	ConnectBind(localhost string, host string) INetChannel
}

type INetListener

type INetListener interface {
	SetEncoder(encoder IEncoder)
	SetDecoder(decoder IDecoder)
	SetRoute(route IRoute)
	Listen(host string) error
}

type IRoute

type IRoute interface {
	Connect(key interface{}, processor FProcessor)
	GetRoute(key interface{}) []FProcessor
	GetRouteKeys() []interface{}
	Trigger(from interface{}, key interface{}, value interface{}) interface{}
}

type IRouteDelegate

type IRouteDelegate interface {
	IRoute
	SetDelegate(raw IRoute)
}

Jump to

Keyboard shortcuts

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