state

package
v0.0.0-...-c6286b5 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileStateManager

type FileStateManager struct {
	Dir string
}

func (FileStateManager) ReadState

func (fsm FileStateManager) ReadState(ctx context.Context, name string, ptr interface{}) error

func (FileStateManager) WriteState

func (fsm FileStateManager) WriteState(ctx context.Context, name string, ptr interface{}) error

type GcpStateManager

type GcpStateManager struct {
	SingletonProvider singleton.SingletonProvider
}

func NewGcpStateManager

func NewGcpStateManager(ctx context.Context, GcpProjectId string) GcpStateManager

func (GcpStateManager) ReadState

func (gsm GcpStateManager) ReadState(ctx context.Context, name string, ptr interface{}) error

func (GcpStateManager) WriteState

func (gsm GcpStateManager) WriteState(ctx context.Context, name string, ptr interface{}) error

type StateManager

type StateManager interface {
	ReadState(ctx context.Context, key string, ptr interface{}) error
	WriteState(ctx context.Context, key string, ptr interface{}) error
}

A StateManager is a thing that can load/persist a verb's state. The caller should place one in the VerbContext.

Jump to

Keyboard shortcuts

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