tables

package
v1.18.0-pre.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BGPReconcileErrCountPerInstance is number of errors stored per instance in statedb.
	BGPReconcileErrCountPerInstance = 5
)

Variables

View Source
var (
	BGPReconcileErrorIndex = statedb.Index[*BGPReconcileError, BGPReconcileErrorKey]{
		Name: "key",
		FromObject: func(obj *BGPReconcileError) index.KeySet {
			return index.NewKeySet(
				BGPReconcileErrorKey{
					Instance: obj.Instance,
					ErrorID:  obj.ErrorID,
				}.Key(),
			)
		},
		FromKey: BGPReconcileErrorKey.Key,
		Unique:  true,
	}
	BGPReconcileErrorInstance = statedb.Index[*BGPReconcileError, string]{
		Name: "Instance",
		FromObject: func(obj *BGPReconcileError) index.KeySet {
			return index.NewKeySet(index.String(obj.Instance))
		},
		FromKey:    index.String,
		FromString: index.FromString,
		Unique:     false,
	}
)

Functions

func NewBGPReconcileErrorTable

func NewBGPReconcileErrorTable() (statedb.RWTable[*BGPReconcileError], error)

Types

type BGPReconcileError

type BGPReconcileError struct {
	Instance string
	ErrorID  int
	Error    string
}

func (*BGPReconcileError) DeepCopy

func (re *BGPReconcileError) DeepCopy() *BGPReconcileError

func (*BGPReconcileError) String

func (re *BGPReconcileError) String() string

func (*BGPReconcileError) TableHeader

func (re *BGPReconcileError) TableHeader() []string

func (*BGPReconcileError) TableRow

func (re *BGPReconcileError) TableRow() []string

type BGPReconcileErrorKey

type BGPReconcileErrorKey struct {
	Instance string
	ErrorID  int
}

func (BGPReconcileErrorKey) Key

func (k BGPReconcileErrorKey) Key() index.Key

Jump to

Keyboard shortcuts

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