pkg

package
v0.2.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogReader

func LogReader(prefix string, in <-chan *api.StreamFrame, out chan<- string)

func LogRecordsPrinter added in v0.2.0

func LogRecordsPrinter(outputCh <-chan string, filterStr []string, excludeStr []string)

func Run

func Run(_ context.Context, conf *Config) error

func Subscriber

func Subscriber(client *api.Client, conf *Config, subs <-chan Subscription, out chan<- string, wg *sync.WaitGroup)

func SubscriptionFinder

func SubscriptionFinder(client *api.Client, subsCh chan<- Subscription, prefix string, task string)

Types

type AllocSpec

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

func (*AllocSpec) String

func (a *AllocSpec) String() string

type Config

type Config struct {
	JobsOrAllocPrefix string
	NomadAddress      string
	Timestamps        bool
	Follow            bool
	ShowStdout        bool
	ShowStderr        bool
	TaskName          string
	FilterStr         *[]string
	ExcludeStr        *[]string
	TailBytes         int64
	Raw               bool
}

Config contains the config (Where is my rock?)

func ParseCLIArguments added in v0.1.1

func ParseCLIArguments(prefix string, opts *Options) (*Config, error)

type Options added in v0.1.1

type Options struct {
	NomadAddr  string
	Follow     bool
	TailBytes  int64
	New        bool
	OnlyStdout bool
	OnlyStderr bool
	TaskName   string
	FilterStr  *[]string
	ExcludeStr *[]string
	Color      string
	Version    bool
	Raw        bool
}

type Subscription

type Subscription struct {
	Node       string
	Job        string
	Alloc      string
	AllocShort string
	Task       string
}

func NewSubscription

func NewSubscription(node, job, alloc, task string) *Subscription

func (*Subscription) String

func (s *Subscription) String() string

Jump to

Keyboard shortcuts

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