stores

package
v3.0.7+incompatible Latest Latest
Warning

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

Go to latest
Published: May 4, 2022 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadReadableStore

func LoadReadableStore(name string, options *Options) (models.ReadableStore, error)

LoadReadableStore finds an available readable store by name

func LoadWritableStore

func LoadWritableStore(name string, options *Options) (models.WritableStore, error)

LoadWritableStore finds a writable store by its name

func RegisterStore

func RegisterStore(name string, store StoreLoader)

RegisterStore registers an available store

Types

type Options

type Options struct {
	Params       map[string]string
	MergeOptions *models.MergeOptions
	ActionInput  jobs.ActionMessage
	Context      context.Context
}

Options passes params and merge options when initializing stores

func CreateOptions

func CreateOptions(ctx context.Context, param map[string]string, input jobs.ActionMessage) *Options

CreateOptions initialize an empty Options object

type StoreLoader

type StoreLoader func(options *Options) (interface{}, error)

StoreLoader must return an initialized store

Directories

Path Synopsis
cells

Jump to

Keyboard shortcuts

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