cluster

package
v0.0.0-...-0c4a898 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2014 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultClusterPort = 8476
View Source
const DefaultPath = "/var/lib/vega"

Variables

View Source
var DefaultRoutingPrefix = "mailbox-routing"

Functions

func NewClusterNode

func NewClusterNode(path string, router *vega.Router) (*clusterNode, error)

func NewConsulClient

func NewConsulClient(token string) *consulapi.Client

func NewConsulRoutingTable

func NewConsulRoutingTable(prefix, id string, client *consulapi.Client) (*consulRoutingTable, error)

func NewMemClusterNode

func NewMemClusterNode(path string) (*clusterNode, error)

Types

type ConsulClusterNode

type ConsulClusterNode struct {
	Config *ConsulNodeConfig
	// contains filtered or unexported fields
}

func NewConsulClusterNode

func NewConsulClusterNode(config *ConsulNodeConfig) (*ConsulClusterNode, error)

func (ConsulClusterNode) Abandon

func (cn ConsulClusterNode) Abandon(name string) error

func (*ConsulClusterNode) Accept

func (cn *ConsulClusterNode) Accept() error

func (ConsulClusterNode) AddRoute

func (cn ConsulClusterNode) AddRoute(name string, s vega.Storage)

func (*ConsulClusterNode) Cleanup

func (cn *ConsulClusterNode) Cleanup() error

func (*ConsulClusterNode) Close

func (cn *ConsulClusterNode) Close() error

func (ConsulClusterNode) Declare

func (cn ConsulClusterNode) Declare(name string) error

func (ConsulClusterNode) LongPoll

func (cn ConsulClusterNode) LongPoll(name string, til time.Duration) (*vega.Delivery, error)

func (ConsulClusterNode) LongPollCancelable

func (cn ConsulClusterNode) LongPollCancelable(name string, til time.Duration, done chan struct{}) (*vega.Delivery, error)

func (ConsulClusterNode) Poll

func (cn ConsulClusterNode) Poll(name string) (*vega.Delivery, error)

func (ConsulClusterNode) Push

func (cn ConsulClusterNode) Push(name string, msg *vega.Message) error

func (ConsulClusterNode) Registry

func (cn ConsulClusterNode) Registry() *vega.Registry

type ConsulNodeConfig

type ConsulNodeConfig struct {
	AdvertiseAddr string
	ListenPort    int
	DataPath      string
	ConsulToken   string
	RoutingPrefix string
}

func (*ConsulNodeConfig) AdvertiseID

func (cn *ConsulNodeConfig) AdvertiseID() string

func (*ConsulNodeConfig) ListenAddr

func (cn *ConsulNodeConfig) ListenAddr() string

func (*ConsulNodeConfig) Normalize

func (cn *ConsulNodeConfig) Normalize() error

Jump to

Keyboard shortcuts

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