proxy

package
v0.0.0-...-6c2238c Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2016 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

func LoadConf

func LoadConf(configFile string) (*Config, error)

type Server

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

func New

func New(addr string, debugVarAddr string, conf *Config) *Server

func (*Server) Close

func (s *Server) Close() error

func (*Server) Info

func (s *Server) Info() models.ProxyInfo

func (*Server) Join

func (s *Server) Join()

func (*Server) SetMyselfOnline

func (s *Server) SetMyselfOnline() error

type TopoUpdate

type TopoUpdate interface {
	OnGroupChange(groupId int)
	OnSlotChange(slotId int)
}

type Topology

type Topology struct {
	ProductName string
	// contains filtered or unexported fields
}

func NewTopo

func NewTopo(ProductName string, zkAddr string, f ZkFactory, provider string, zkSessionTimeout int) *Topology

func (*Topology) Close

func (top *Topology) Close(proxyName string)

func (*Topology) CreateProxyFenceNode

func (top *Topology) CreateProxyFenceNode(pi *models.ProxyInfo) (string, error)

func (*Topology) CreateProxyInfo

func (top *Topology) CreateProxyInfo(pi *models.ProxyInfo) (string, error)

func (*Topology) DoResponse

func (top *Topology) DoResponse(seq int, pi *models.ProxyInfo) error

func (*Topology) Exist

func (top *Topology) Exist(path string) (bool, error)

func (*Topology) GetActionResponsePath

func (top *Topology) GetActionResponsePath(seq int) string

func (*Topology) GetActionSeqList

func (top *Topology) GetActionSeqList(productName string) ([]int, error)

func (*Topology) GetActionWithSeq

func (top *Topology) GetActionWithSeq(seq int64) (*models.Action, error)

func (*Topology) GetActionWithSeqObject

func (top *Topology) GetActionWithSeqObject(seq int64, act *models.Action) error

func (*Topology) GetGroup

func (top *Topology) GetGroup(groupId int) (*models.ServerGroup, error)

func (*Topology) GetProxyInfo

func (top *Topology) GetProxyInfo(proxyName string) (*models.ProxyInfo, error)

func (*Topology) GetSlotByIndex

func (top *Topology) GetSlotByIndex(i int) (*models.Slot, *models.ServerGroup, error)

func (*Topology) InitZkConn

func (top *Topology) InitZkConn()

func (*Topology) IsChildrenChangedEvent

func (top *Topology) IsChildrenChangedEvent(e interface{}) bool

func (*Topology) SetProxyStatus

func (top *Topology) SetProxyStatus(proxyName string, status string) error

func (*Topology) WatchChildren

func (top *Topology) WatchChildren(path string, evtbus chan interface{}) ([]string, error)

func (*Topology) WatchNode

func (top *Topology) WatchNode(path string, evtbus chan interface{}) ([]byte, error)

type ZkFactory

type ZkFactory func(zkAddr string, zkSessionTimeout int) (zkhelper.Conn, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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