znet

package
v0.32.9 Latest Latest
Warning

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

Go to latest
Published: May 5, 2023 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Server string = "server"

	Harvester string = "harvester"
	Timer     string = "timer"

	Telemetry string = "telemetry"
	IOT       string = "iot"
	Lights    string = "lights"
	Inventory string = "inventory"

	All string = "all"
)

Variables

View Source
var ErrNoGRPCServices = errors.New("no grpc services")

ErrNoGRPCServices is used to indicate that no grpc services are found on the server.

Functions

func LoadEnvironment added in v0.4.0

func LoadEnvironment(cfg *config.VaultConfig, e *config.EnvironmentConfig) (map[string]string, error)

LoadEnvironment reads reads environment variables out of vault for return.

func PeerCN added in v0.32.0

func PeerCN(streamContext context.Context) string

Types

type Config

type Config struct {
	Target string `yaml:"target"`

	Tracing ztrace.Config `yaml:"tracing,omitempty"`

	// modules
	Server    server.Config    `yaml:"server,omitempty"`
	Harvester harvester.Config `yaml:"harvester"`
	Inventory inventory.Config `yaml:"inventory"`
	IOT       iot.Config       `yaml:"iot"`
	Lights    lights.Config    `yaml:"lights"`
	Telemetry telemetry.Config `yaml:"telemetry"`
	Timer     timer.Config     `yaml:"timer"`

	RPC config.RPCConfig `yaml:"rpc,omitempty"`
}

func LoadConfig

func LoadConfig(file string) (Config, error)

LoadConfig receives a file path for a configuration to load.

func (*Config) RegisterFlagsAndApplyDefaults added in v0.32.0

func (c *Config) RegisterFlagsAndApplyDefaults(prefix string, f *flag.FlagSet)

type Znet added in v0.1.0

type Znet struct {
	Server *server.Server

	ModuleManager *modules.Manager
	// contains filtered or unexported fields
}

Znet is the core object for this project. It keeps track of the data, configuration and flow control for starting the server process.

func New added in v0.32.0

func New(cfg Config) (*Znet, error)

New creates and returns a new Znet object.

func (*Znet) Run added in v0.32.0

func (z *Znet) Run() error

Jump to

Keyboard shortcuts

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