announcer

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Announcer

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

func New

func New() *Announcer

func (*Announcer) Add

func (a *Announcer) Add(impl Impl)

func (*Announcer) Announce

func (a *Announcer) Announce(ctx context.Context, r *membership.Roxy) error

func (*Announcer) Close

func (a *Announcer) Close() error

func (*Announcer) Withdraw

func (a *Announcer) Withdraw(ctx context.Context) error

type Format

type Format uint8
const (
	RoxyFormat Format = iota
	FinagleFormat
	GRPCFormat
)

func (Format) MarshalJSON

func (f Format) MarshalJSON() ([]byte, error)

func (*Format) Parse

func (f *Format) Parse(str string) error

func (Format) String

func (f Format) String() string

func (*Format) UnmarshalJSON

func (f *Format) UnmarshalJSON(raw []byte) error

type Impl

type Impl interface {
	Announce(ctx context.Context, r *membership.Roxy) error
	Withdraw(ctx context.Context) error
	Close() error
}

func NewATC

func NewATC(client *atcclient.ATCClient, serviceName, location, unique, namedPort string, loadFn atcclient.LoadFunc) (Impl, error)

func NewEtcd

func NewEtcd(etcd *v3.Client, path, unique, namedPort string, format Format) (Impl, error)

func NewZK

func NewZK(zkconn *zk.Conn, path, unique, namedPort string, format Format) (Impl, error)

Jump to

Keyboard shortcuts

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