config

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OperatorAPIPath  = "/api/v1"
	SchedulerAPIPath = "/api/v1/scheduler"
)

Variables

This section is empty.

Functions

func HomeDir

func HomeDir() string

Types

type Config

type Config struct {
	Profiles map[string]*Profile `json:"profiles"`
}

type Option

type Option func(*Profile)

Options are functional profile options

func Debug

func Debug(debug bool) Option

func Master

func Master(master string) Option

Master specifies the Mesos master hostname

func Restart

func Restart(restart bool) Option

type Profile

type Profile struct {
	Master  string `json:"master"`
	Debug   bool   `json:"debug"`
	Restart bool   `json:"restart"`
	// contains filtered or unexported fields
}

Profile contains environment specific options

func LoadProfile

func LoadProfile(path, name string) (profile *Profile, err error)

LoadProfile loads a user configuration from ~/.mesos-cli.json creating a JSON file with defaults if it does not exist.

func (Profile) Endpoint

func (p Profile) Endpoint() *url.URL

func (Profile) Framework

func (p Profile) Framework() *mesos.FrameworkInfo

func (*Profile) Log

func (p *Profile) Log() *zap.Logger

func (Profile) Scheduler

func (p Profile) Scheduler() *url.URL

func (*Profile) With

func (p *Profile) With(opts ...Option) *Profile

type ProfileFn added in v0.0.7

type ProfileFn func() *Profile

ProfileFn returns a Profile

Jump to

Keyboard shortcuts

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