configkv

package
v0.0.0-...-2200cc9 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigKV

type ConfigKV struct {
	KV nats.KeyValue
	// contains filtered or unexported fields
}

func NewConfigKV

func NewConfigKV(jetstreamContext nats.JetStreamContext) (*ConfigKV, error)

NewConfigKV is the constructor for *ConfigKV

func (*ConfigKV) GetConfigBytes

func (configkv *ConfigKV) GetConfigBytes(key string) ([]byte, error)

GetConfigBytes returns config from the KV backend in bytes

func (*ConfigKV) Put

func (configkv *ConfigKV) Put(key string, value []byte) (uint64, error)

Put is a wrapper on Nats KV.Put

type ConfigKVHTTPGetAll

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

ConfigKVHTTPGetAll is http handler to render all config in JSON format

func NewConfigKVHTTPGetAll

func NewConfigKVHTTPGetAll(configkv *ConfigKV) *ConfigKVHTTPGetAll

NewConfigKVHTTPGetAll is constructor for ConfigKVHTTPGetAll

func (*ConfigKVHTTPGetAll) ServeHTTP

func (handler *ConfigKVHTTPGetAll) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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