provisiond

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2025 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Module cli.Command = cli.Command{
	Name:  "provisiond",
	Usage: "handles reservations streams and use other daemon to deploy them",
	Flags: []cli.Flag{
		&cli.StringFlag{
			Name:  "root",
			Usage: "`ROOT` working directory of the module",
			Value: "/var/cache/modules/provisiond",
		},
		&cli.StringFlag{
			Name:  "broker",
			Usage: "connection string to the message `BROKER`",
			Value: "unix:///var/run/redis.sock",
		},
		&cli.BoolFlag{
			Name:  "integrity",
			Usage: "run some integrity checks on some files",
		},
	},
	Action: action,
}

Module entry point

Functions

func ReportChecks

func ReportChecks(metricsPath string) error

Types

type CapacitySetter

type CapacitySetter struct {
	// contains filtered or unexported fields
}

func NewCapacitySetter

func NewCapacitySetter(substrateGateway *stubs.SubstrateGatewayStub, storage provision.Storage) CapacitySetter

func (*CapacitySetter) Callback

func (c *CapacitySetter) Callback(twin uint32, contract uint64, delete bool)

func (*CapacitySetter) Run

func (c *CapacitySetter) Run(ctx context.Context) error

func (*CapacitySetter) Set

func (c *CapacitySetter) Set(deployment ...gridtypes.Deployment) error

type ContractEventHandler

type ContractEventHandler struct {
	// contains filtered or unexported fields
}

func NewContractEventHandler

func NewContractEventHandler(node uint32, substrateGateway *stubs.SubstrateGatewayStub, engine provision.Engine, events *events.RedisConsumer) ContractEventHandler

func (*ContractEventHandler) Run

Run runs the reporter

type DeploymentID

type DeploymentID struct {
	Twin     uint32
	Contract uint64
}

type Report

type Report struct {
	Consumption []substrate.NruConsumption
}

type Reporter

type Reporter struct {
	// contains filtered or unexported fields
}

Reporter structure

func NewReporter

func NewReporter(metricsPath string, cl zbus.Client, root string) (*Reporter, error)

NewReporter creates a new capacity reporter

func (*Reporter) Close

func (r *Reporter) Close()

func (*Reporter) Run

func (r *Reporter) Run(ctx context.Context) error

Run runs the reporter

Jump to

Keyboard shortcuts

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