maps

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DynamicMapUpdates

type DynamicMapUpdates struct {
	// ToAdd contains the entries to add to the map
	Add    map[string]string
	Update map[string]string
	// ToDelete contains the entries to delete from the map
	Delete []string
}

DynamicMapUpdates contains the updates to be applied to the map on runtime (and to have diff)

type MapData

type MapData struct {

	// Path is set only if the map was saved on disk (this is a gate configuration)
	// For HUG, maps are stored on disk
	Path futils.FilePath
	// Dynamic updates through runtime
	DynamicUpdates DynamicMapUpdates
	// ReloadNeeded is managed only if the gate library did try to run a runtime command (this is a gate configuration)
	// For HUG, the gate library will try to create/update/delete maps through runtime
	// By default, it is set to true
	// If the gate library did try to update the maps through runtime (create/update/delete), and a reload is not needed
	// as the runtime command did succeed, then the flag is set to false
	ReloadNeeded bool
	// contains filtered or unexported fields
}

func (*MapData) AddData

func (m *MapData) AddData(key, val string)

AddData adds a key-value pair to the map If the key already exists, the value is updated

func (*MapData) Data

func (m *MapData) Data() map[string]string

Data returns the map data

func (*MapData) DeleteData

func (m *MapData) DeleteData(key string)

DeleteData deletes a key from the map

func (*MapData) SetData

func (m *MapData) SetData(data map[string]string)

SetData sets the map data

Jump to

Keyboard shortcuts

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