balancer

package
v0.0.0-...-ea7e872 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

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

func NewBackend

func NewBackend(f *entity.Frontend, opt BackendOptions) (*Backend, error)

func (*Backend) Attach

func (b *Backend) Attach(ch *tls.Conn) error

func (*Backend) Next

func (b *Backend) Next() string

type BackendOptions

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

type Manager

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

func GetManager

func GetManager() (*Manager, error)

func NewManager

func NewManager(ctx context.Context, tlsBundle tlssec.TLSBundle) *Manager

func (*Manager) AddFrontend

func (mgr *Manager) AddFrontend(fe *entity.Frontend) error

func (*Manager) InitWithStorage

func (mgr *Manager) InitWithStorage(ctx context.Context, stor storage.IManagerBackend) error

func (*Manager) RemoveFrontend

func (mgr *Manager) RemoveFrontend(fe *entity.Frontend) error

func (*Manager) Stop

func (mgr *Manager) Stop()

type RoundRobin

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

func NewRoundRobin

func NewRoundRobin(from, to int64) *RoundRobin

func (*RoundRobin) End

func (rr *RoundRobin) End() int64

func (*RoundRobin) Next

func (rr *RoundRobin) Next() int64

func (*RoundRobin) Start

func (rr *RoundRobin) Start() int64

Jump to

Keyboard shortcuts

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