model

package
v0.0.0-...-bcc6005 Latest Latest
Warning

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

Go to latest
Published: May 22, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetermineInterval

func DetermineInterval(ft *FillInterval) time.Duration

Types

type BlackHole

type BlackHole struct {
	Address        string            `yaml:"address"`
	Celestial      string            `yaml:"celestial"`
	Apollo         string            `yaml:"apollo"`
	Meridian       string            `yaml:"meridian"`
	DB             []string          `yaml:"db"`
	Queues         map[string]Queue  `yaml:"queue"`
	InstrumentConf map[string]string `yaml:"instrument"`
}

type BlackHoleConfig

type BlackHoleConfig struct {
	Address        string
	Celestial      string
	Apollo         string
	Meridian       string
	DB             []string
	Opts           []*TaskOption
	InstrumentConf map[string]string
}

func LoadConfig

func LoadConfig(n ...string) (*BlackHoleConfig, error)

type Config

type Config struct {
	Content BlackHole `yaml:"blackhole"`
}

type FillInterval

type FillInterval struct {
	Interval int    `yaml:"interval"`
	Rate     string `yaml:"rate"`
}

type Queue

type Queue struct {
	Namespace  string       `yaml:"namespace"`
	TRetry     Retry        `yaml:"retry"`
	MaxWorkers int          `yaml:"maxWorkers"`
	Capacity   int64        `yaml:"capacity"`
	Tokens     int64        `yaml:"tokens"`
	Rate       FillInterval `yaml:"fillInterval"`
}

type Retry

type Retry struct {
	Delay    string `yaml:"delay"`
	Doubling int    `yaml:"doubling"`
	Limit    int    `yaml:"limit"`
}

type TaskOption

type TaskOption struct {
	TRetry     *Retry        `yaml:"retry"`
	Namespace  string        `yaml:"namespace"`
	Name       string        `yaml:"name"`
	MaxWorkers int           `yaml:"maxWorkers"`
	MaxQueued  int           `yaml:"maxQueued"`
	Capacity   int64         `yaml:"capacity"`
	Tokens     int64         `yaml:"tokens"`
	FillRate   *FillInterval `yaml:"fillInterval"`
}

Jump to

Keyboard shortcuts

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