groups

package
v1.4.6 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallBackFuncsWithAppDef

type CallBackFuncsWithAppDef func(app application.AppDefinition) error

CallBackFuncsWithAppDef function type

type CallBackFuncsWithAppID

type CallBackFuncsWithAppID func(appID string) error

CallBackFuncsWithAppID function type

type Group

type Group struct {
	ID           string                      `json:"id"`
	Apps         []application.AppDefinition `json:"apps"`
	Groups       []Group                     `json:"groups"`
	Pods         []interface{}               `json:"pods"`
	Dependencies []string                    `json:"dependencies,omitempty"`
	Version      time.Time                   `json:"version,omitempty"`
	VersionInfo  application.VersionInfo     `json:"versionInfo,omitempty"`
	Executor     string                      `json:"executor,omitempty"`
	EnforceRole  bool                        `json:"enforceRole,omitempty"`
}

Group encapsulates the data definitions of a Marathon Group

type Groups

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

Groups is Marathon Groups implementation

func NewGroups

func NewGroups(client *marathon.Client) *Groups

NewGroups returns a new instance of Marathon groups implementation

func (*Groups) Apply

func (mg *Groups) Apply(force bool) error

Apply uses the content of mg.group.Apps to apply the configuration

func (*Groups) Create

func (mg *Groups) Create(group *Group) error

Create allows create a Marathon group into server

func (*Groups) Destroy

func (mg *Groups) Destroy() error

Destroy erase a Marathon group from server

func (*Groups) Dump

func (mg *Groups) Dump(fileName string) (err error)

Dump permit write group information to a file

func (*Groups) Get

func (mg *Groups) Get(id string) *Groups

Get allows to establish the internal structures to referenced id

func (*Groups) Load

func (mg *Groups) Load(fileName string) *Groups

Load permit read group information from a file

func (*Groups) Restart

func (mg *Groups) Restart(force bool) error

Restart use an endpoint to trigger restart for all filteredApps in a Marathon group

func (*Groups) Scale

func (mg *Groups) Scale(instances int, force bool) error

Scale allows change instances numbers of a Marathon group filteredApps

func (*Groups) Start

func (mg *Groups) Start(instances int, force bool) error

Start sets instances of a Marathon group filteredApps to a number provided

func (*Groups) Stop

func (mg *Groups) Stop(force bool) error

Stop sets instances of a Marathon group filteredApps to 0

func (*Groups) Suspend

func (mg *Groups) Suspend(force bool) error

Suspend is an alias for Stop

func (*Groups) Update

func (mg *Groups) Update(group *Group) error

Update allows change values into Marathon group

Jump to

Keyboard shortcuts

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