Documentation
¶
Overview ¶
Package store provides storage interfaces and implementations for staging.
Index ¶
Constants ¶
const ( HintApply = "apply" // Unstage triggered by apply (changes were applied to AWS) HintReset = "reset" // Unstage triggered by reset (changes were discarded) HintPersist = "persist" // Unstage triggered by persist (state saved to file) )
Hint values for context-aware shutdown messages.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentStore ¶
type AgentStore interface {
ReadWriteOperator
Drainer
Writer
Pinger
Starter
}
AgentStore provides full access to agent storage including drain/write operations.
type Drainer ¶
type Drainer interface {
// Drain retrieves the entire state from storage.
// If service is empty, returns all services; otherwise filters to the specified service.
// If keep is false, the source storage is cleared after reading.
Drain(ctx context.Context, service staging.Service, keep bool) (*staging.State, error)
}
Drainer provides bulk read access to staging state (for drain command).
type HintedUnstager ¶
type HintedUnstager interface {
// UnstageEntryWithHint removes a staged entry with an operation hint.
UnstageEntryWithHint(ctx context.Context, service staging.Service, name string, hint string) error
// UnstageTagWithHint removes staged tag changes with an operation hint.
UnstageTagWithHint(ctx context.Context, service staging.Service, name string, hint string) error
// UnstageAllWithHint removes all staged changes with an operation hint.
UnstageAllWithHint(ctx context.Context, service staging.Service, hint string) error
}
HintedUnstager provides unstage operations with hints for context-aware shutdown messages. This interface is optional and only implemented by agent stores.
type ReadOperator ¶
type ReadOperator interface {
// GetEntry retrieves a staged entry.
GetEntry(ctx context.Context, service staging.Service, name string) (*staging.Entry, error)
// GetTag retrieves staged tag changes.
GetTag(ctx context.Context, service staging.Service, name string) (*staging.TagEntry, error)
// ListEntries returns all staged entries for a service.
ListEntries(ctx context.Context, service staging.Service) (map[staging.Service]map[string]staging.Entry, error)
// ListTags returns all staged tag changes for a service.
ListTags(ctx context.Context, service staging.Service) (map[staging.Service]map[string]staging.TagEntry, error)
}
ReadOperator provides read-only access to individual staging entries.
type ReadWriteOperator ¶
type ReadWriteOperator interface {
ReadOperator
WriteOperator
}
ReadWriteOperator combines read and write access to staging entries.
type Starter ¶ added in v0.7.4
Starter ensures the agent daemon is running, starting it if necessary.
type WriteOperator ¶
type WriteOperator interface {
// StageEntry adds or updates a staged entry.
StageEntry(ctx context.Context, service staging.Service, name string, entry staging.Entry) error
// StageTag adds or updates staged tag changes.
StageTag(ctx context.Context, service staging.Service, name string, tagEntry staging.TagEntry) error
// UnstageEntry removes a staged entry.
UnstageEntry(ctx context.Context, service staging.Service, name string) error
// UnstageTag removes staged tag changes.
UnstageTag(ctx context.Context, service staging.Service, name string) error
// UnstageAll removes all staged changes for a service.
UnstageAll(ctx context.Context, service staging.Service) error
}
WriteOperator provides write access to individual staging entries.
type Writer ¶
type Writer interface {
// WriteState writes the entire state to storage.
// If service is empty, writes all services; otherwise writes only the specified service.
WriteState(ctx context.Context, service staging.Service, state *staging.State) error
}
Writer provides bulk write access to staging state.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package agent provides shared types and configuration for the staging agent client and server packages.
|
Package agent provides shared types and configuration for the staging agent client and server packages. |
|
daemon
Package daemon provides daemon lifecycle management for the staging agent.
|
Package daemon provides daemon lifecycle management for the staging agent. |
|
daemon/internal/ipc
Package ipc provides low-level IPC communication for the staging agent.
|
Package ipc provides low-level IPC communication for the staging agent. |
|
daemon/lifecycle
Package lifecycle provides declarative agent lifecycle management for staging commands.
|
Package lifecycle provides declarative agent lifecycle management for staging commands. |
|
internal/client
Package client provides the domain-level client for the staging agent.
|
Package client provides the domain-level client for the staging agent. |
|
internal/protocol
Package protocol defines the IPC protocol between the agent client and server.
|
Package protocol defines the IPC protocol between the agent client and server. |
|
internal/server
Package server provides request handling for the staging agent.
|
Package server provides request handling for the staging agent. |
|
internal/server/security
Package security provides security-related functionality for the agent server.
|
Package security provides security-related functionality for the agent server. |
|
Package file provides file-based staging storage.
|
Package file provides file-based staging storage. |
|
internal/crypt
Package crypt provides passphrase-based encryption for staging files.
|
Package crypt provides passphrase-based encryption for staging files. |
|
Package testutil provides test utilities for staging package.
|
Package testutil provides test utilities for staging package. |