servicer

package
v1.0.25 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeRegistry uint8 = 1
	TypeIPPort   uint8 = 2
	TypeDomain   uint8 = 3
)

Variables

View Source
var (
	Servicers = make(map[string]Servicer)
)

Functions

func DelServicer added in v1.0.20

func DelServicer(s Servicer)

func SetServicer added in v1.0.20

func SetServicer(s Servicer)

Types

type DoneInfo

type DoneInfo struct {
	Node *Node
	Err  error
}

type Node

type Node struct {
	Host string
	Port int
}

type Servicer

type Servicer interface {
	Name() string
	Pick(ctx context.Context) (*Node, error)
	Done(ctx context.Context, node *Node, err error) error
	GetCaCrt() []byte
	GetClientPem() []byte
	GetClientKey() []byte
}

func GetServicer added in v1.0.20

func GetServicer(serviceName string) (Servicer, bool)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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