persist

package
v0.11.5 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFileLogger

func NewFileLogger(logFilename string) (*zap.Logger, func(), error)

NewFileLogger returns a logger that logs to logFilename. The file is opened in append mode, and created if it does not exist.

Types

type SatdConfig

type SatdConfig struct {
	Name          string `json:"name"`
	GatewayAddr   string `json:"gateway"`
	APIAddr       string `json:"api"`
	SatelliteAddr string `json:"satellite"`
	MuxAddr       string `json:"mux"`
	Dir           string `json:"dir"`
	DBUser        string `json:"dbUser"`
	DBName        string `json:"dbName"`
	PortalPort    string `json:"portal"`
}

SatdConfig contains the fields that are passed on to the new node.

func (*SatdConfig) Load

func (sc *SatdConfig) Load(dir string) (ok bool, err error)

Load loads the configuration from disk.

func (*SatdConfig) Save

func (sc *SatdConfig) Save(dir string) error

Save stores the configuration on disk.

Jump to

Keyboard shortcuts

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