Documentation
¶
Overview ¶
Package redis is the builtin Orchard provider for Redis and wire-compatible stores (Valkey, Dragonfly, KeyDB).
It offers redis_command, a raw command runner, and typed redis_set and redis_hset actions for the two shapes most seed data takes: a value under a key, and a hash of fields.
Index ¶
- type Provider
- func (p *Provider) Close() error
- func (p *Provider) Configure(ctx context.Context, config map[string]cty.Value) error
- func (p *Provider) Execute(ctx context.Context, action string, attrs map[string]cty.Value) (map[string]cty.Value, error)
- func (p *Provider) ExecuteUndo(ctx context.Context, action string, attrs map[string]cty.Value, ...) (map[string]cty.Value, *provider.Invocation, error)
- func (p *Provider) PlanAction(_ context.Context, action string, attrs map[string]cty.Value) (provider.Plan, error)
- func (p *Provider) Schema() protocol.ProviderSchema
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider is the Redis provider implementation.
A zero Provider is valid but not yet usable — Configure must be called before Execute. Schema works on a zero Provider so the engine can validate scenarios before connecting.
func (*Provider) Close ¶
Close closes the client. Safe to call on an unconfigured provider or more than once.
func (*Provider) Configure ¶
Configure connects to the url config attribute and sends PING, so a bad URL or an unreachable server fails before any action runs.
func (*Provider) Execute ¶
func (p *Provider) Execute(ctx context.Context, action string, attrs map[string]cty.Value) (map[string]cty.Value, error)
Execute dispatches to the handler for the given action.
func (*Provider) ExecuteUndo ¶
func (p *Provider) ExecuteUndo(ctx context.Context, action string, attrs map[string]cty.Value, opts provider.InverseOptions) (map[string]cty.Value, *provider.Invocation, error)
ExecuteUndo runs an action like Execute and also describes its undo (see written.undo).
func (*Provider) PlanAction ¶
func (p *Provider) PlanAction(_ context.Context, action string, attrs map[string]cty.Value) (provider.Plan, error)
PlanAction runs the checks that need no server, at plan and before a run: args, ttl, null values and on_conflict. Output types are static in the schema.
func (*Provider) Schema ¶
func (p *Provider) Schema() protocol.ProviderSchema
Schema returns the embedded provider schema.