supbindex

package
v0.0.0-...-5fda629 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: MulanPSL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeStrategy     = "dynamic.strategy"
	TypeApplication  = "dynamic.application"
	TypeRelationShip = "relationship"

	ModsStrategy1 = "strategy.applications"
	ModsStrategy2 = "strategy.metrics"
	ModsStrategy3 = "strategy.logs"
	ModsStrategy4 = "strategy.traces"
	ModsStrategy5 = "strategy.common"
	ModsStrategy6 = "strategy.custom"

	ModsApplication1 = "application.devices"
	ModsApplication2 = "application.metrics"
	ModsApplication3 = "application.logs"
	ModsApplication4 = "application.trace"
	ModsApplication5 = "application.common"
	ModsApplication6 = "application.custom"
)

Variables

This section is empty.

Functions

func WithResMgr

func WithResMgr(res *supbres.SupbResources) option

Types

type Index

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

func NewIndex

func NewIndex(ctx context.Context, prefix string) *Index

func (*Index) Close

func (r *Index) Close() error

func (*Index) GetList

func (r *Index) GetList() []*Item

func (*Index) GetSwitch

func (r *Index) GetSwitch(iKey ItemKey) map[string]string

func (*Index) GraphAdd

func (r *Index) GraphAdd(iKey ItemKey) error

func (*Index) GraphDelete

func (r *Index) GraphDelete(iKey ItemKey) error

func (*Index) InitFlags

func (r *Index) InitFlags(flags *pflag.FlagSet)

func (*Index) InitViper

func (r *Index) InitViper(viper *viper.Viper)

func (*Index) Initialize

func (r *Index) Initialize(opts ...option)

func (*Index) OptionConfig

func (r *Index) OptionConfig(opts ...option)

func (*Index) ReSortList

func (r *Index) ReSortList(id []int)

func (*Index) SwitchOff

func (r *Index) SwitchOff(key ItemKey, mod string) error

func (*Index) SwitchOn

func (r *Index) SwitchOn(key ItemKey, mod string) error

func (*Index) TypeKeyPair

func (r *Index) TypeKeyPair(page, key string) (ItemKey, error)

func (*Index) TypeKeyPairRelationShip

func (r *Index) TypeKeyPairRelationShip(page string, key, kind, name string) (ItemKey, error)

func (*Index) UpdateList

func (r *Index) UpdateList(items []*Item)

func (*Index) ViperConfig

func (r *Index) ViperConfig(viper *viper.Viper)

type Item

type Item struct {
	Key  string `json:"object.key"`
	Page string `json:"object.page"`
	Kind string `json:"object.relationship.kind"`

	Name     string `json:"object.name"`
	PageName string `json:"object.page.name"`

	DetailModsSelf    string `json:"object.details.self"`
	DetailModsLogs    string `json:"object.details.logs"`
	DetailModsMetrics string `json:"object.details.metrics"`
	DetailModsTrace   string `json:"object.details.trace"`
	DetailModsCommon  string `json:"object.details.common"`
	DetailModsCustom  string `json:"object.details.custom"`
}

func (*Item) DeepCopy

func (r *Item) DeepCopy() *Item

type ItemKey

type ItemKey struct {
	Page string `json:"object.page"`
	Key  string `json:"object.key"`
	Kind string `json:"object.relationship.kind"`
	Name string `json:"object.name"`
}

type Modules

type Modules struct {
	Key string
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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