config

package module
v0.0.0-...-75dcc22 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: GPL-3.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetId

func GetId() (string, error)

GetId gets the instance id from the config.

Types

type Config

type Config struct {
	ID        string `json:"id" yaml:"id" xml:"id" form:"id"`                             // The identifier of the instance.
	ClusterID string `json:"clusterId" yaml:"clusterId" xml:"clusterId" form:"clusterId"` // The cluster this instance belongs to.
}

Config is a struct of the local, persistent configuration of this instance.

func Read

func Read() (Config, error)

Read returns the current configuration.

func Update

func Update(newConfig Config) (Config, error)

Update creates or modifies config properties.

func UpdateId

func UpdateId(id string) (Config, error)

UpdateId updates the instance id in the config, given an id.

Jump to

Keyboard shortcuts

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