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

redis

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2026 License: MIT Imports: 15 Imported by: 0

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

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 New

func New() *Provider

New returns an unconfigured Redis provider.

func (*Provider) Close

func (p *Provider) Close() error

Close closes the client. Safe to call on an unconfigured provider or more than once.

func (*Provider) Configure

func (p *Provider) Configure(ctx context.Context, config map[string]cty.Value) error

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.

Jump to

Keyboard shortcuts

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