kvstoremanager

package
v1.13.0-preview-2 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EventToKeyValue

func EventToKeyValue(jsonData json.RawMessage) (string, map[string]interface{})

func ExtractHashKeyValueFromEvent

func ExtractHashKeyValueFromEvent(jsonData json.RawMessage) (hash, key, value string)

func IsHSETCompatibleEvent

func IsHSETCompatibleEvent(jsonData json.RawMessage) bool

IsHSETCompatibleEvent identifies if the event supports HSET operation To support HSET, the event must have the following fields: - message.key - message.value - message.hash It doesn't account for the value of the fields.

Types

type KVStoreManager

type KVStoreManager interface {
	Connect()
	Close() error
	HMSet(key string, fields map[string]interface{}) error
	HSet(key, field string, value interface{}) error
	StatusCode(err error) int
	DeleteKey(key string) (err error)
	HMGet(key string, fields ...string) (result []interface{}, err error)
	HGetAll(key string) (result map[string]string, err error)
}

func New

func New(provider string, config map[string]interface{}) (m KVStoreManager)

type SettingsT

type SettingsT struct {
	Provider string
	Config   map[string]interface{}
}

Jump to

Keyboard shortcuts

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