runtime

package
v0.0.0-...-bad022f Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

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

func New

func New(adapter filter.Adapter, policy SnapshotPolicy) *Engine

func (*Engine) AppendPosition

func (e *Engine) AppendPosition(ctx context.Context, snapshot filter.Snapshot, rule filter.FirewallRule) (int64, error)

func (*Engine) AppendUnverified

func (e *Engine) AppendUnverified(ctx context.Context, rule filter.FirewallRule, comment string) error

func (*Engine) Capabilities

func (e *Engine) Capabilities(ctx context.Context) (filter.Capabilities, error)

func (*Engine) CheckRule

func (e *Engine) CheckRule(ctx context.Context, rule filter.FirewallRule) error

func (*Engine) CompileDesired

func (e *Engine) CompileDesired(
	ctx context.Context,
	policyUUID string,
	origin filter.RuleOrigin,
	rules []filter.FirewallRule,
) ([]filter.DesiredRule, error)

func (*Engine) Execute

func (*Engine) MaxPosition

func (e *Engine) MaxPosition(
	ctx context.Context,
	snapshot filter.Snapshot,
	rule filter.FirewallRule,
) (int64, error)

func (*Engine) NativeDetail

func (e *Engine) NativeDetail(ctx context.Context, name string, permanent bool) (string, error)

func (*Engine) Observe

func (e *Engine) Observe(ctx context.Context, scope filter.Scope) (filter.Snapshot, error)

func (*Engine) ObserveMutation

func (e *Engine) ObserveMutation(ctx context.Context, scope filter.Scope) (filter.Snapshot, error)

func (*Engine) ObserveScopes

func (e *Engine) ObserveScopes(ctx context.Context, scopes []filter.Scope) ([]filter.Snapshot, error)

func (*Engine) Prepare

func (e *Engine) Prepare(rule filter.FirewallRule) (filter.FirewallRule, error)

func (*Engine) Provider

func (e *Engine) Provider() filter.Provider

func (*Engine) Rollback

func (e *Engine) Rollback(ctx context.Context, plan filter.BackendPlan) error

func (*Engine) ValidatePosition

func (e *Engine) ValidatePosition(
	ctx context.Context,
	snapshot filter.Snapshot,
	rule filter.FirewallRule,
	target int64,
) error

type Registry

type Registry map[filter.Provider]*Engine

func NewRegistry

func NewRegistry(policy SnapshotPolicy) Registry

func (Registry) Providers

func (r Registry) Providers() []filter.Provider

func (Registry) Resolve

func (r Registry) Resolve(provider filter.Provider) (*Engine, error)

type SnapshotPolicy

type SnapshotPolicy func(context.Context, filter.Snapshot) (filter.Snapshot, error)

Jump to

Keyboard shortcuts

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