licensedevice

package
v0.0.0-...-5206ba3 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DatabaseConnStr string `codec:"database_connection_string"`
	TableName       string `codec:"database_table_name"`
	NodeID          string `codec:"node_id"`
}

type Plugin

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

func ConfiguredPlugin

func ConfiguredPlugin(config *Config) (*Plugin, error)

func NewPlugin

func NewPlugin() *Plugin

func (*Plugin) ConfigSchema

func (p *Plugin) ConfigSchema() (*hclspec.Spec, error)

func (*Plugin) Fingerprint

func (p *Plugin) Fingerprint(ctx context.Context) (<-chan *device.FingerprintResponse, error)

func (*Plugin) PluginInfo

func (p *Plugin) PluginInfo() (*base.PluginInfoResponse, error)

func (*Plugin) Reserve

func (p *Plugin) Reserve(deviceIDs []string) (*device.ContainerReservation, error)

func (*Plugin) SetConfig

func (p *Plugin) SetConfig(c *base.Config) error

func (*Plugin) Stats

func (p *Plugin) Stats(ctx context.Context, interval time.Duration) (<-chan *device.StatsResponse, error)

Directories

Path Synopsis
cmd
nomad_license_plugin
Follows example main: https://github.com/hashicorp/nomad-skeleton-device-plugin/blob/31e2e063e167ed4bdbba787b659fac75d4bce659/main.go
Follows example main: https://github.com/hashicorp/nomad-skeleton-device-plugin/blob/31e2e063e167ed4bdbba787b659fac75d4bce659/main.go

Jump to

Keyboard shortcuts

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