pod

package
v0.0.0-...-a288e68 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2020 License: Apache-2.0 Imports: 2 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pods

type Pods struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewPods

func NewPods() *Pods

func (*Pods) Get

func (p *Pods) Get() []string

func (*Pods) Has

func (p *Pods) Has(name string) bool

func (*Pods) Set

func (p *Pods) Set(pods []string)

type Source

type Source interface {
	Name() string
	URL() string
	Pods() ([]string, error)
	GetTasks(podName string) ([]Task, error)
}

type Task

type Task interface {
	Name() string
	Service() string
	State() TaskState
	HasState() bool
	IsRunning() bool
	IsUpdating() bool
	IsTaskType(taskType TaskType) bool
	GetMongoAddr() (*db.Addr, error)
	GetMongoReplsetName() (string, error)
}

type TaskState

type TaskState interface {
	String() string
}

type TaskType

type TaskType string
var (
	TaskTypeMongod       TaskType = "mongod"
	TaskTypeMongodBackup TaskType = "mongod-backup"
	TaskTypeArbiter      TaskType = "arbiter"
	TaskTypeConfigSvr    TaskType = "configsvr"
	TaskTypeMongos       TaskType = "mongos"
)

func (TaskType) String

func (t TaskType) String() string

Directories

Path Synopsis
Code generated by mockery v1.0.0.
Code generated by mockery v1.0.0.

Jump to

Keyboard shortcuts

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