wanfed

package
v1.9.0-beta2 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2020 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// GossipPacketMaxIdleTime controls how long we keep an idle connection
	// open to a server.
	//
	// Conceptually similar to: agent/consul/server.go:serverRPCCache
	GossipPacketMaxIdleTime = 2 * time.Minute

	// GossipPacketMaxByteSize is the maximum allowed size of a packet
	// forwarded via wanfed. This is 4MB which should be way bigger than serf
	// or memberlist allow practically so it should never be hit in practice.
	GossipPacketMaxByteSize = 4 * 1024 * 1024
)

Variables

This section is empty.

Functions

func SplitNodeName

func SplitNodeName(nodeName string) (shortName, dc string, err error)

SplitNodeName splits a node name as it would be represented in serf/memberlist in the WAN pool of the form "<short-node-name>.<datacenter>" like "nyc-web42.dc5" => "nyc-web42" & "dc5"

Types

type MeshGatewayResolver

type MeshGatewayResolver func(datacenter string) string

type Transport

type Transport struct {
	memberlist.NodeAwareTransport
	// contains filtered or unexported fields
}

func NewTransport

func NewTransport(
	tlsConfigurator *tlsutil.Configurator,
	transport memberlist.NodeAwareTransport,
	datacenter string,
	gwResolver MeshGatewayResolver,
) (*Transport, error)

func (*Transport) DialAddressTimeout

func (t *Transport) DialAddressTimeout(addr memberlist.Address, timeout time.Duration) (net.Conn, error)

DialAddressTimeout implements memberlist.NodeAwareTransport.

func (*Transport) Shutdown

func (t *Transport) Shutdown() error

Shutdown implements memberlist.Transport.

func (*Transport) WriteToAddress

func (t *Transport) WriteToAddress(b []byte, addr memberlist.Address) (time.Time, error)

WriteToAddress implements memberlist.NodeAwareTransport.

Jump to

Keyboard shortcuts

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