persist

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	*log.Logger
}

Logger is a wrapper for log.Logger.

func NewFileLogger

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

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

func NewLogger

func NewLogger(w io.Writer) (*Logger, error)

NewLogger returns a logger that can be closed. Calls should not be made to the logger after 'Close' has been called.

type SatdConfig

type SatdConfig struct {
	Name          string `json:"name"`
	UserAgent     string `json:"agent"`
	GatewayAddr   string `json:"gateway"`
	APIAddr       string `json:"api"`
	SatelliteAddr string `json:"satellite"`
	Dir           string `json:"dir"`
	Bootstrap     bool   `json:"bootstrap"`
	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