system

package
v0.0.0-test-multiarch Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package system and sub packages add optional features to a controller.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Disabled bool `json:"disabled,omitempty"`
}

type Factory

type Factory interface {
	New(services Services) service.Lifecycle
}

type FactoryFunc

type FactoryFunc func(services Services) service.Lifecycle

func (FactoryFunc) New

func (f FactoryFunc) New(services Services) service.Lifecycle

type RawConfig

type RawConfig struct {
	Config
	Raw json.RawMessage `json:"-"`
}

func (RawConfig) MarshalJSON

func (c RawConfig) MarshalJSON() ([]byte, error)

func (*RawConfig) UnmarshalJSON

func (c *RawConfig) UnmarshalJSON(buf []byte) error

type Services

type Services struct {
	ConfigDirs      []string
	DataDir         string
	Logger          *zap.Logger
	GRPCEndpoint    string     // host:port of this controllers grpc api
	Node            *node.Node // for advertising devices
	CohortManager   node.Remote
	Database        *bolthold.Store
	HTTPMux         *http.ServeMux      // to allow systems to serve http requests
	TokenValidators *token.ValidatorSet // to allow systems to contribute towards client validation
	// GRPCCerts allows a system to contribute a pki.Source that might be used for outbound or inbound gRPC connections.
	// These certs will be used only if no other certificate mechanism is in effect, for example if the controller is
	// enrolled in a cohort then the cohort certificates will be used,
	// if the controller has been configured to read certificates from a file then they will be used.
	// These certificates get used in preference to self signed certificates only.
	GRPCCerts       *pki.SourceSet
	PrivateKey      pki.PrivateKey // the key managed by the controller
	ClientTLSConfig *tls.Config    // for connecting to other smartcore nodes
}

Directories

Path Synopsis
Package authn provides token based authentication for gRPC requests.
Package authn provides token based authentication for gRPC requests.
Package history provides an implementation of HistoryAdminApi backed by a history.Store.
Package history provides an implementation of HistoryAdminApi backed by a history.Store.
hub
Package hub manages the enrollment process for a cohort of nodes.
Package hub manages the enrollment process for a cohort of nodes.

Jump to

Keyboard shortcuts

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