router

package
v0.0.0-...-93dd735 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2016 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

View Source
const (
	BIND_TIMEOUT_SECONDS = "4000"
)
View Source
const (
	FEATURE_OPEN_ENCRYPT = 1 << iota // open encrypt
)
View Source
const (
	SINGLE = ""
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Backends

type Backends struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewBackends

func NewBackends(cnf *conf.RouterConf, service *Service) *Backends

func (*Backends) SendTo

func (self *Backends) SendTo(addr string, msg *p.Message) error

func (*Backends) Serve

func (self *Backends) Serve()

type Feature

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

func NewFeature

func NewFeature(mask int64) *Feature

func (*Feature) ActiveEncrypt

func (self *Feature) ActiveEncrypt() bool

func (*Feature) Encrypt

func (self *Feature) Encrypt()

type Service

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

func NewService

func NewService(cnf *conf.RouterConf, routing bind.Routing, registor registor.Registor) *Service

router service. goroutines about: start:

  1. watch support,router from etcd
  2. process crash other router

type TCPServer

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

func NewTCPServer

func NewTCPServer(cnf *conf.RouterConf, service *Service) *TCPServer

func (*TCPServer) Serve

func (self *TCPServer) Serve() error

func (*TCPServer) Stop

func (self *TCPServer) Stop()

type Transport

type Transport interface {
	Id() string
	GetProduct() int32
	Write(msg *p.Message) error
	StartWriteLoop()
	Close() error
}

Jump to

Keyboard shortcuts

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