state

package
v1.7.4 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QueryInitTable = "InitTable"
	QueryGet       = "Get"
	QuerySet       = "Set"
	QueryDelete    = "Delete"
)

Variables

This section is empty.

Functions

func NewEtcdStateStore

func NewEtcdStateStore(endpoints []string, prefix string, timeout time.Duration) (hermod.StateStore, error)

func NewMemoryStore

func NewMemoryStore() hermod.StateStore

func NewRedisStateStore

func NewRedisStateStore(addr, password string, db int, prefix string, ttl time.Duration) hermod.StateStore

func NewSQLiteStateStore

func NewSQLiteStateStore(path string) (hermod.StateStore, error)

func NewStateStore

func NewStateStore(cfg Config) (hermod.StateStore, error)

Types

type Config

type Config struct {
	Type     string
	Path     string
	Address  string
	Password string
	DB       int
	Prefix   string
}

type EtcdStateStore

type EtcdStateStore struct {
	// contains filtered or unexported fields
}

func (*EtcdStateStore) Close

func (s *EtcdStateStore) Close() error

func (*EtcdStateStore) Delete

func (s *EtcdStateStore) Delete(ctx context.Context, key string) error

func (*EtcdStateStore) Get

func (s *EtcdStateStore) Get(ctx context.Context, key string) ([]byte, error)

func (*EtcdStateStore) Set

func (s *EtcdStateStore) Set(ctx context.Context, key string, value []byte) error

type RedisStateStore

type RedisStateStore struct {
	// contains filtered or unexported fields
}

func (*RedisStateStore) Delete

func (s *RedisStateStore) Delete(ctx context.Context, key string) error

func (*RedisStateStore) Get

func (s *RedisStateStore) Get(ctx context.Context, key string) ([]byte, error)

func (*RedisStateStore) Set

func (s *RedisStateStore) Set(ctx context.Context, key string, value []byte) error

type SQLiteStateStore

type SQLiteStateStore struct {
	// contains filtered or unexported fields
}

func (*SQLiteStateStore) Close

func (s *SQLiteStateStore) Close() error

func (*SQLiteStateStore) Delete

func (s *SQLiteStateStore) Delete(ctx context.Context, key string) error

func (*SQLiteStateStore) Get

func (s *SQLiteStateStore) Get(ctx context.Context, key string) ([]byte, error)

func (*SQLiteStateStore) Set

func (s *SQLiteStateStore) Set(ctx context.Context, key string, value []byte) error

Jump to

Keyboard shortcuts

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