agent

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2025 License: Apache-2.0 Imports: 19 Imported by: 1

Documentation

Index

Constants

View Source
const (
	GRPCTransportType TransportType = "grpc"
	FileTransportType TransportType = "file"
	NATSTransportType TransportType = "nats"

	DockerRuntimeType     RuntimeType = "docker"
	ContainerdRuntimeType RuntimeType = "containerd"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BackoffOptions added in v0.20.0

type BackoffOptions struct {
	// MaxInterval is the maximum interval between retries.
	MaxInterval time.Duration
}

BackoffOptions holds the configuration for the backoff strategy.

type Config

type Config struct {
	TransportReader TransportReader
	RuntimeExecutor RuntimeExecutor
	TransportWriter TransportWriter
	Backoff         *backoff.ExponentialBackOff
}

func (*Config) Run

func (c *Config) Run(ctx context.Context, log logr.Logger)

type ContainerdRuntime

type ContainerdRuntime struct {
	Namespace  string
	SocketPath string
}

type DockerRuntime

type DockerRuntime struct {
	SocketPath string
}

type FileTransport

type FileTransport struct {
	WorkflowPath string
}

type GRPCTransport

type GRPCTransport struct {
	ServerAddrPort string
	TLSEnabled     bool
	TLSInsecure    bool
	RetryInterval  time.Duration
}

type NATSTransport

type NATSTransport struct {
	ServerAddrPort netip.AddrPort
	StreamName     string
	EventsSubject  string
	ActionsSubject string
}

type Options

type Options struct {
	Transport                 Transport
	Runtime                   Runtime
	Registry                  Registry
	Proxy                     Proxy
	TransportSelected         TransportType
	RuntimeSelected           RuntimeType
	AttributeDetectionEnabled bool
	BackoffOptions            BackoffOptions
}

func (*Options) ConfigureAndRun

func (o *Options) ConfigureAndRun(inctx context.Context, log logr.Logger, id string) error

type Proxy

type Proxy struct {
	HTTPProxy  []string
	HTTPSProxy []string
	NoProxy    []string
}

type Registry

type Registry struct {
	Name string
	User string
	Pass string
}

type Runtime

type Runtime struct {
	Docker     DockerRuntime
	Containerd ContainerdRuntime
}

type RuntimeExecutor

type RuntimeExecutor interface {
	// Execute blocks until the action is completed or an error occurs
	Execute(ctx context.Context, action spec.Action) error
}

RuntimeExecutor provides a method to execute an action.

type RuntimeType

type RuntimeType string

func (*RuntimeType) Set

func (r *RuntimeType) Set(s string) error

func (RuntimeType) String

func (r RuntimeType) String() string

func (*RuntimeType) Type

func (r *RuntimeType) Type() string

type Transport

type Transport struct {
	GRPC GRPCTransport
	File FileTransport
	NATS NATSTransport
}

type TransportReader

type TransportReader interface {
	// Read blocks until an action is available or an error occurs
	Read(ctx context.Context) (spec.Action, error)
}

TransportReader provides a method to read an action.

type TransportType

type TransportType string

func (*TransportType) Set

func (t *TransportType) Set(s string) error

func (TransportType) String

func (t TransportType) String() string

func (*TransportType) Type

func (t *TransportType) Type() string

type TransportWriter

type TransportWriter interface {
	// Write blocks until the event is written or an error occurs
	Write(ctx context.Context, event spec.Event) error
}

TransportWriter provides a method to write an event.

Directories

Path Synopsis
internal
pkg/rand
Package rand provides utilities related to randomization.
Package rand provides utilities related to randomization.

Jump to

Keyboard shortcuts

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