mem

package
v1.5.6 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name = "MemorySource"
)

const

Variables

View Source
var ErrSourceNotReady = errors.New("source is not ready")

Functions

func NewMemoryConfigurationSource

func NewMemoryConfigurationSource() source.ConfigSource

NewMemoryConfigurationSource initializes all necessary components for memory configuration

Types

type Source

type Source struct {
	Configs sync.Map

	Ready chan bool
	// contains filtered or unexported fields
}

Source is a struct

func (*Source) AddDimensionInfo

func (ms *Source) AddDimensionInfo(labels map[string]string) error

AddDimensionInfo is none function

func (*Source) Cleanup

func (ms *Source) Cleanup() error

Cleanup cleans a particular memory configuration up

func (*Source) Delete

func (ms *Source) Delete(key string) error

Delete remvove mem config

func (*Source) GetConfigurationByKey

func (ms *Source) GetConfigurationByKey(key string) (interface{}, error)

GetConfigurationByKey gets required memory configuration for a particular key

func (*Source) GetConfigurations

func (ms *Source) GetConfigurations() (map[string]interface{}, error)

GetConfigurations gets all memory configurations

func (*Source) GetPriority

func (ms *Source) GetPriority() int

GetPriority returns priority of the memory configuration

func (*Source) GetSourceName

func (*Source) GetSourceName() string

GetSourceName returns name of memory configuration

func (*Source) Set

func (ms *Source) Set(key string, value interface{}) error

Set set mem config

func (*Source) SetPriority

func (ms *Source) SetPriority(priority int)

SetPriority custom priority

func (*Source) Watch

func (ms *Source) Watch(callback source.EventHandler) error

Watch dynamically handles a memory configuration

Jump to

Keyboard shortcuts

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