client

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: MPL-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(logger hclog.Logger, config *Config) (*Client, error)

func (*Client) AllocStateUpdated

func (c *Client) AllocStateUpdated(a *cproto.Allocation)

func (*Client) Stop

func (c *Client) Stop()

type Config

type Config struct {
	NodeID       string
	ControlPlane ControlPlane
	Volume       *HostVolume
	PersistentDB *bolt.DB
}

type ControlPlane

type ControlPlane interface {
	// Pull pulls the configs assigned to the agent when updated
	Pull(nodeId string, ws memdb.WatchSet) ([]*proto.Allocation, error)

	// UpdateAlloc updates an allocation state
	UpdateAlloc(alloc *proto.Allocation) error
}

type HostVolume

type HostVolume struct {
	Path string
}

type MetricsUpdater

type MetricsUpdater interface {
	UpdateMetrics(string, map[string]*dto.MetricFamily)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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