config

package
v0.0.0-...-49d2269 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPort = 5500
	DefaultCpu  = 1.0             // 1 vCPU
	DefaultMem  = 256 / (1 << 20) // 256 MB
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ApiVersion     string  `json:"api_version"`
	ApiPort        int     `json:"api_port"`
	DefaultTaskCpu float64 `json:"default_task_cpu"`
	DefaultTaskMem int     `json:"default_task_mem"`
	WorkerId       string  `json:"worker_id"`
}

func NewConfig

func NewConfig(options ...ConfigFn) Config

type ConfigFn

type ConfigFn func(cfg *Config)

func WithApiVersion

func WithApiVersion(version string) ConfigFn

func WithWorkerId

func WithWorkerId(wid string) ConfigFn

Jump to

Keyboard shortcuts

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