static

package
v2.0.16 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2024 License: MIT Imports: 3 Imported by: 0

README

静态地址池

Documentation

Index

Constants

View Source
const (
	Scheme = "static"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

func GetStore

func GetStore() *Store

func NewStore

func NewStore() *Store

func (*Store) Add

func (s *Store) Add(service string, targets ...*Target)

func (*Store) Get

func (s *Store) Get(service string) *TargetSet

type Target

type Target struct {
	Address string
	// contains filtered or unexported fields
}

func NewTarget

func NewTarget(address string) *Target

func (*Target) SetWeight

func (t *Target) SetWeight(weight uint32) *Target

func (*Target) String

func (t *Target) String() string

type TargetSet

type TargetSet struct {
	Items []*Target
}

func NewTargetSet

func NewTargetSet() *TargetSet

func (*TargetSet) Add

func (s *TargetSet) Add(ts ...*Target)

Jump to

Keyboard shortcuts

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