Help us shape the future of Go! Take the 2026 Go Developer Survey

statestore

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigureRequest

type ConfigureRequest struct {
	Config             tftypes.Value
	ClientCapabilities *tfprotov6.ConfigureStateStoreClientCapabilities
}

type ConfigureResponse

type ConfigureResponse struct {
	Diagnostics        []*tfprotov6.Diagnostic
	ServerCapabilities *tfprotov6.StateStoreServerCapabilities
}

type DeleteStateRequest

type DeleteStateRequest struct {
	StateID string
}

type DeleteStateResponse

type DeleteStateResponse struct {
	Diagnostics []*tfprotov6.Diagnostic
}

type GetStatesRequest

type GetStatesRequest struct{}

type GetStatesResponse

type GetStatesResponse struct {
	StateIDs    []string
	Diagnostics []*tfprotov6.Diagnostic
}

type LockStateRequest

type LockStateRequest struct {
	StateID   string
	Operation string
}

type LockStateResponse

type LockStateResponse struct {
	LockID      string
	Diagnostics []*tfprotov6.Diagnostic
}

type ReadStateBytesRequest

type ReadStateBytesRequest struct {
	StateID string
}

type ReadStateBytesResponse

type ReadStateBytesResponse struct {
	StateBytes  []byte
	Diagnostics []*tfprotov6.Diagnostic
}

type SchemaRequest

type SchemaRequest struct{}

type SchemaResponse

type SchemaResponse struct {
	Diagnostics []*tfprotov6.Diagnostic
	Schema      *tfprotov6.Schema
}

type StateStore

type StateStore interface {
	Schema(context.Context, SchemaRequest, *SchemaResponse)
	Configure(context.Context, ConfigureRequest, *ConfigureResponse)
	ValidateConfig(context.Context, ValidateConfigRequest, *ValidateConfigResponse)
	GetStates(context.Context, GetStatesRequest, *GetStatesResponse)
	DeleteState(context.Context, DeleteStateRequest, *DeleteStateResponse)
	LockState(context.Context, LockStateRequest, *LockStateResponse)
	UnlockState(context.Context, UnlockStateRequest, *UnlockStateResponse)

	// For ease-of-use, the streaming of chunk data is handled in the provider server for reading/writing
	ReadStateBytes(context.Context, ReadStateBytesRequest, *ReadStateBytesResponse)
	WriteStateBytes(context.Context, WriteStateBytesRequest, *WriteStateBytesResponse)

	// This isn't a GRPC call, but it allows the implementation to define the chunk size while the provider server owns the actual chunking logic.
	ConfiguredChunkSize() int64
}

type UnlockStateRequest

type UnlockStateRequest struct {
	StateID string
	LockID  string
}

type UnlockStateResponse

type UnlockStateResponse struct {
	Diagnostics []*tfprotov6.Diagnostic
}

type ValidateConfigRequest

type ValidateConfigRequest struct {
	Config tftypes.Value
}

type ValidateConfigResponse

type ValidateConfigResponse struct {
	Diagnostics []*tfprotov6.Diagnostic
}

type WriteStateBytesRequest

type WriteStateBytesRequest struct {
	StateID    string
	StateBytes []byte
}

type WriteStateBytesResponse

type WriteStateBytesResponse struct {
	Diagnostics []*tfprotov6.Diagnostic
}

Jump to

Keyboard shortcuts

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