cluster

package
v0.0.0-...-f7471f1 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

type Cluster struct {
	ID     string
	Name   string
	URL    string
	Status string
}

type Request

type Request struct {
	RequestTopic `json:",inline"`
	Clusters     map[string]*Cluster // Clusters by ID
}

func NewRequest

func NewRequest(requestedBy string, n int) *Request

func RequestByID

func RequestByID(id string) *Request

type RequestRegistry

type RequestRegistry struct {
	Requests map[string]*Request
	// contains filtered or unexported fields
}

RequestRegistry represents a registry of all cluster resources

func (*RequestRegistry) Add

func (r *RequestRegistry) Add(req *Request)

func (*RequestRegistry) AllRequests

func (r *RequestRegistry) AllRequests() []Request

AllRequests returns all Requests from the registry

func (*RequestRegistry) Get

func (r *RequestRegistry) Get(id string) *Request

func (*RequestRegistry) Remove

func (r *RequestRegistry) Remove(id string)

type RequestTopic

type RequestTopic struct {
	ID          string
	Requested   int // Number of clusters requested
	Created     time.Time
	Status      string
	RequestedBy string
}

RequestTopic represents a cluster request without details about actual clusters provisioned for this request

func RequestTopics

func RequestTopics() []RequestTopic

RequestTopics returns all existing Cluster Request Topics from the default registry sorted by creation time

Jump to

Keyboard shortcuts

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