provider

package
v0.0.0-...-d19e6b0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const LogName = "lazygate.provider"

Variables

This section is empty.

Functions

This section is empty.

Types

type Allocation

type Allocation interface {
	Stop() error  // Stop stops the allocation.
	Start() error // Start starts the allocation.

	State() AllocationState              // State returns current allocation state.
	Config() (*allocation.Config, error) // Config of allocation.
}

Allocation represents physical allocation.

type AllocationState

type AllocationState uint8

AllocationState represents allocation state.

const (
	AllocationStateUnknown AllocationState = iota // Allocation is in unknown state.
	AllocationStateStarted                        // Allocation is in started state.
	AllocationStateStopped                        // Allocation is in stopped state.
)

type InitOptions

type InitOptions struct {
	Ctx context.Context // Plugin context.
}

InitOptions represents options to pass to provider initializer.

type Provider

type Provider interface {
	Init(opts *InitOptions) error // Init initializes the provider.

	AllocationGet(srv proxy.RegisteredServer) (Allocation, error) // AllocationGet returns matching Allocation.
	AllocationList() ([]Allocation, error)                        // AllocationList returns all matching Allocation's.
}

Provider manipulates with registered servers.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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