queue

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrContextCanceled = errors.New("proxy client queue: context canceled")
)

Functions

func NewClient

func NewClient(queue *Queue) proxyclient.Client

Types

type Map

type Map[T any] struct {
	// contains filtered or unexported fields
}

func NewMap

func NewMap[T any]() *Map[T]

func (*Map[T]) Del

func (m *Map[T]) Del(k string)

func (*Map[T]) Get

func (m *Map[T]) Get(k string) (T, bool)

func (*Map[T]) Pop

func (m *Map[T]) Pop(k string) (T, bool)

func (*Map[T]) Range

func (m *Map[T]) Range(f func(k string, v T) bool)

func (*Map[T]) Set

func (m *Map[T]) Set(k string, v T)

type Proxy

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

func NewProxy

func NewProxy(queue *Queue) *Proxy

func (*Proxy) Activate

func (p *Proxy) Activate(ctx context.Context, proxy entity.Proxy) error

func (*Proxy) Deactivate

func (p *Proxy) Deactivate(ctx context.Context, proxyID string) error

type Queue

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

func NewQueue

func NewQueue(client *http.Client, interval time.Duration) *Queue

func (*Queue) Close

func (q *Queue) Close()

func (*Queue) Start

func (q *Queue) Start() error

type Route

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

func NewRoute

func NewRoute(queue *Queue) *Route

func (*Route) Delete

func (r *Route) Delete(ctx context.Context, routes []entity.Route) error

func (*Route) Register

func (r *Route) Register(ctx context.Context, routes []entity.Route) error

Jump to

Keyboard shortcuts

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