server

package
v0.0.0-...-83a8c6e Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(decryptPreference, socketLocation string, enabledProviders []string, timeout time.Duration) (providers.KeyManagementService, error)

New creates an instance of the KMS Service Server.

Types

type Fastest

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

Fastest sorts providers by response time.

func NewFastest

func NewFastest(providers []string) *Fastest

NewFastest creates a new Fastest selector.

func (*Fastest) C

func (f *Fastest) C() chan<- Metric

C returns channel to send metrics.

func (*Fastest) Fastest

func (f *Fastest) Fastest() []string

Fastest returns providers sorted by response time.

type Metric

type Metric struct {
	Provider    string
	ReponseTime time.Duration
}

Metric contains one measurement.

type Roundrobin

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

Roundrobin sorts providers based on Round-robin algorithm.

func NewRoundrobin

func NewRoundrobin(providers []string) *Roundrobin

NewRoundrobin creates a new Roundrobin selector.

func (*Roundrobin) Next

func (r *Roundrobin) Next() []string

Next returns the next iteration.

Jump to

Keyboard shortcuts

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