runnerconfig

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package runnerconfig defines the single current private runner configuration.

Index

Constants

View Source
const MaxConfigBytes = 16 << 10

Variables

View Source
var ErrInvalid = errors.New("invalid_runner_configuration")

Functions

This section is empty.

Types

type Config

type Config struct {
	Contract         int                      `json:"contract"`
	NodeID           string                   `json:"node_id"`
	InstallationID   string                   `json:"installation_id"`
	ListenPort       uint16                   `json:"listen_port"`
	TokenSHA256      string                   `json:"token_sha256"`
	CommitmentKey    []byte                   `json:"commitment_key"`
	Budget           jobcontract.RunnerBudget `json:"budget"`
	MaxStorageBytes  uint64                   `json:"max_storage_bytes"`
	MinFreeBytes     uint64                   `json:"min_free_bytes"`
	ReservationBytes uint64                   `json:"reservation_bytes"`
}

func Decode

func Decode(reader io.Reader) (Config, error)

func New

func New(token []byte) (Config, error)

New creates one installation identity from a caller-owned node token. The token itself is never persisted; existing installations must load their file.

func (Config) Clear

func (config Config) Clear()

func (Config) GoString

func (config Config) GoString() string

func (Config) Policy

func (config Config) Policy() jobhost.Policy

func (Config) String

func (Config) String() string

func (*Config) UnmarshalJSON

func (config *Config) UnmarshalJSON(document []byte) error

func (Config) Validate

func (config Config) Validate() error

Jump to

Keyboard shortcuts

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