dataplane

package
v0.1.25 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2026 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModeAuto     = "AUTO"
	ModeNative   = "NATIVE"
	ModeHAProxy  = "HAPROXY"
	ModeNFTables = "NFTABLES"

	ConflictPolicyFailFast = "FAIL_FAST"

	ErrorListenerConflict                  = "LISTENER_CONFLICT"
	ErrorListenerOwnedByOtherPrismInstance = "LISTENER_OWNED_BY_OTHER_PRISM_INSTANCE"
	ErrorListenerOwnedByExternalProcess    = "LISTENER_OWNED_BY_EXTERNAL_PROCESS"
	ErrorDataplaneUnsupportedRule          = "DATAPLANE_UNSUPPORTED_RULE"
	ErrorDataplaneDrift                    = "DATAPLANE_DRIFT"
	ErrorNFTablesLocked                    = "NFTABLES_LOCKED"
	ErrorHAProxyValidateFailed             = "HAPROXY_VALIDATE_FAILED"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	Name() string
	Capabilities() Capabilities
	Apply(ctx context.Context, snapshot agent.ConfigSnapshot) error
	Status(ctx context.Context) Status
	CleanupOwnedState(ctx context.Context) error
	Close() error
}

type Capabilities

type Capabilities struct {
	TCP              bool
	UDP              bool
	TLSSNI           bool
	ProxyProtocolIn  bool
	ProxyProtocolOut bool
	TargetGroup      bool
	HostnameTarget   bool
	KernelL4         bool
}

type CommandRunner

type CommandRunner interface {
	CombinedOutput(ctx context.Context, name string, args ...string) ([]byte, error)
	Start(ctx context.Context, name string, args ...string) error
}

type HAProxyBackend

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

func NewHAProxyBackend

func NewHAProxyBackend(options Options) *HAProxyBackend

func (*HAProxyBackend) AgentMetrics

func (backend *HAProxyBackend) AgentMetrics() agent.MetricsPayload

func (*HAProxyBackend) Apply

func (backend *HAProxyBackend) Apply(ctx context.Context, snapshot agent.ConfigSnapshot) error

func (*HAProxyBackend) Capabilities

func (backend *HAProxyBackend) Capabilities() Capabilities

func (*HAProxyBackend) CleanupOwnedState

func (backend *HAProxyBackend) CleanupOwnedState(context.Context) error

func (*HAProxyBackend) Close

func (backend *HAProxyBackend) Close() error

func (*HAProxyBackend) Name

func (backend *HAProxyBackend) Name() string

func (*HAProxyBackend) Status

func (backend *HAProxyBackend) Status(context.Context) Status

type Manager

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

func NewManager

func NewManager(options Options) *Manager

func (*Manager) AgentMetrics

func (manager *Manager) AgentMetrics() agent.MetricsPayload

func (*Manager) Apply

func (manager *Manager) Apply(ctx context.Context, snapshot agent.ConfigSnapshot) error

func (*Manager) CleanupOwnedState

func (manager *Manager) CleanupOwnedState(ctx context.Context) error

func (*Manager) Close

func (manager *Manager) Close() error

func (*Manager) ResolvedDataplanes

func (manager *Manager) ResolvedDataplanes() map[string]string

type NFTablesBackend

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

func NewNFTablesBackend

func NewNFTablesBackend(options Options) *NFTablesBackend

func (*NFTablesBackend) AgentMetrics

func (backend *NFTablesBackend) AgentMetrics() agent.MetricsPayload

func (*NFTablesBackend) Apply

func (backend *NFTablesBackend) Apply(ctx context.Context, snapshot agent.ConfigSnapshot) error

func (*NFTablesBackend) Capabilities

func (backend *NFTablesBackend) Capabilities() Capabilities

func (*NFTablesBackend) CleanupOwnedState

func (backend *NFTablesBackend) CleanupOwnedState(ctx context.Context) error

func (*NFTablesBackend) Close

func (backend *NFTablesBackend) Close() error

func (*NFTablesBackend) Name

func (backend *NFTablesBackend) Name() string

func (*NFTablesBackend) Status

func (backend *NFTablesBackend) Status(context.Context) Status

type NativeBackend

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

func (*NativeBackend) AgentMetrics

func (backend *NativeBackend) AgentMetrics() agent.MetricsPayload

func (*NativeBackend) Apply

func (backend *NativeBackend) Apply(ctx context.Context, snapshot agent.ConfigSnapshot) error

func (*NativeBackend) Capabilities

func (backend *NativeBackend) Capabilities() Capabilities

func (*NativeBackend) CleanupOwnedState

func (backend *NativeBackend) CleanupOwnedState(ctx context.Context) error

func (*NativeBackend) Close

func (backend *NativeBackend) Close() error

func (*NativeBackend) Name

func (backend *NativeBackend) Name() string

func (*NativeBackend) Status

func (backend *NativeBackend) Status(context.Context) Status

type Options

type Options struct {
	Mode             string
	ConflictPolicy   string
	InstanceID       string
	ServiceName      string
	InstallDir       string
	StateDir         string
	RunDir           string
	HAProxyPath      string
	NFTPath          string
	CommandRunner    CommandRunner
	ExternalBackends bool
}

type Status

type Status struct {
	Dataplane        string
	Available        bool
	Version          string
	Health           string
	Owner            string
	DriftStatus      string
	ExternalResource string
	Error            string
	LastApplyHash    string
}

Jump to

Keyboard shortcuts

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