Documentation
¶
Index ¶
- Constants
- type Config
- type ContainerdRuntime
- type DockerRuntime
- type FileTransport
- type GRPCTransport
- type KubernetesRuntime
- type NATSTransport
- type Options
- type Proxy
- type Registry
- type Retry
- type Runtime
- type RuntimeExecutor
- type RuntimeType
- type Transport
- type TransportReader
- type TransportType
- type TransportWriter
Constants ¶
const ( GRPCTransportType TransportType = "grpc" FileTransportType TransportType = "file" NATSTransportType TransportType = "nats" DockerRuntimeType RuntimeType = "docker" ContainerdRuntimeType RuntimeType = "containerd" KubernetesRuntimeType RuntimeType = "kubernetes" )
const ( // DefaultPollInterval is the default average delay between polls when no work is available. DefaultPollInterval = 5 * time.Second // DefaultMaxInterval is the default cap on the delay before retrying after an error or a conflict. DefaultMaxInterval = 30 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
TransportReader TransportReader
RuntimeExecutor RuntimeExecutor
TransportWriter TransportWriter
Retry Retry
}
type ContainerdRuntime ¶
type DockerRuntime ¶
type DockerRuntime struct {
SocketPath string
}
type FileTransport ¶
type FileTransport struct {
WorkflowPath string
}
type GRPCTransport ¶
type KubernetesRuntime ¶ added in v0.25.0
type NATSTransport ¶
type Options ¶
type Options struct {
Transport Transport
Runtime Runtime
Registry Registry
Proxy Proxy
TransportSelected TransportType
RuntimeSelected RuntimeType
AttributeDetectionEnabled bool
// LLDPTimeout bounds how long attribute detection waits for LLDP
// neighbors. Detection finishes before any Action runs because an Action
// can power-cycle the machine. Zero disables LLDP discovery.
LLDPTimeout time.Duration
Retry Retry
}
type Retry ¶ added in v0.26.0
type Retry struct {
// PollInterval is the average delay between polls when no work is available.
// Each delay is uniformly random in [PollInterval/2, 3*PollInterval/2).
PollInterval time.Duration
// MaxInterval caps the delay before retrying after an error or a conflict.
MaxInterval time.Duration
}
Retry is the Agent's retry policy. The Agent is the only component that retries; the Tink Server makes a single attempt per request. See docs/technical/designs/AGENT_SERVER_RETRY.md.
Transports classify errors by implementing any of these methods:
NoAction() bool // no work is available, poll again later Conflict() bool // a transient conflict, retry soon Permanent() bool // retrying will not succeed
Any other error is retried with exponential backoff.
type Runtime ¶
type Runtime struct {
Docker DockerRuntime
Containerd ContainerdRuntime
Kubernetes KubernetesRuntime
}
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
Directories
¶
| Path | Synopsis |
|---|---|
|
internal
|
|
|
pkg/rand
Package rand provides utilities related to randomization.
|
Package rand provides utilities related to randomization. |
|
runtime/kubernetes
Package kubernetes implements a tink-agent RuntimeExecutor that runs Actions as Kubernetes Jobs via the Kubernetes API instead of a local Docker/containerd socket.
|
Package kubernetes implements a tink-agent RuntimeExecutor that runs Actions as Kubernetes Jobs via the Kubernetes API instead of a local Docker/containerd socket. |