componentcfg

package
v0.20.81 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SEPARATOR      = "/"
	SEPARATOR_RUNE = '/'
)
View Source
const (
	ConfigComponentsPath = "o2/components/"
)

Variables

View Source
var (
	E_BAD_KEY = errors.New("bad component configuration key format")
)

Functions

func GetComponentsMapFromKeysList

func GetComponentsMapFromKeysList(keys []string) map[string]bool

keys must be a slice containing all the full keys in /o2/components

func GetEntriesMapOfComponentFromKeysList

func GetEntriesMapOfComponentFromKeysList(component string, runtype apricotpb.RunType, rolename string, keys []string) map[string]bool

func GetLatestTimestamp

func GetLatestTimestamp(keys []string, p *Query) (timestamp string, err error)

Method to return the latest timestamp for a specified component & entry If no keys were passed an error and code exit 3 will be returned

func GetTimestampInFormat

func GetTimestampInFormat(timestamp string, timeFormat string) (string, error)

Method to parse a timestamp in the specified format

func IsInputSingleValidWord

func IsInputSingleValidWord(input string) bool

Checks whether the input string is a valid Consul path element on its own

func IsStringValidEntriesQueryPath added in v0.19.90

func IsStringValidEntriesQueryPath(input string) bool

func IsStringValidQueryPathWithOptionalTimestamp added in v0.19.90

func IsStringValidQueryPathWithOptionalTimestamp(input string) bool

Types

type EntriesQuery added in v0.19.90

type EntriesQuery struct {
	Component string
	RunType   apricotpb.RunType
	RoleName  string
}

func NewEntriesQuery added in v0.19.90

func NewEntriesQuery(path string) (p *EntriesQuery, err error)

type Query added in v0.19.90

type Query struct {
	Component string
	RunType   apricotpb.RunType
	RoleName  string
	EntryKey  string
	Timestamp string
}

func NewQuery added in v0.19.90

func NewQuery(path string) (p *Query, err error)

func (*Query) AbsoluteRaw added in v0.19.90

func (p *Query) AbsoluteRaw() string

func (*Query) AbsoluteWithoutTimestamp added in v0.19.90

func (p *Query) AbsoluteWithoutTimestamp() string

func (*Query) Path added in v0.19.90

func (p *Query) Path() string

func (*Query) Raw added in v0.19.90

func (p *Query) Raw() string

func (*Query) WithoutTimestamp added in v0.19.90

func (p *Query) WithoutTimestamp() string

Jump to

Keyboard shortcuts

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