Documentation
¶
Overview ¶
Package state keeps small records that must outlive a run, such as what each report last posted and when, in memory, in a file, or in AWS SSM Parameter Store.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
File keeps records in one JSON file. Writes replace the file atomically. It is for a single process; separate processes sharing the file can lose each other's writes.
func NewFile ¶
NewFile creates a store that keeps records in the file at path. The file and its directory are created on the first write.
type Memory ¶
type Memory struct {
// contains filtered or unexported fields
}
Memory keeps records in memory, so they are lost when the process exits.
type SSM ¶
type SSM struct {
// contains filtered or unexported fields
}
SSM keeps each record in a String parameter named prefix + key. Records are not secret, so they are not encrypted.
func NewSSM ¶
NewSSM creates a store that keeps records under prefix, a path that starts and ends with a slash, such as /github-ops-app/state/. A nil client is created from the default AWS configuration, which makes no network calls.
type SSMClient ¶
type SSMClient interface {
GetParameter(ctx context.Context, in *ssm.GetParameterInput, opts ...func(*ssm.Options)) (*ssm.GetParameterOutput, error)
PutParameter(ctx context.Context, in *ssm.PutParameterInput, opts ...func(*ssm.Options)) (*ssm.PutParameterOutput, error)
}
SSMClient is the part of the SSM API the SSM store uses.