rancher2_api

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container struct {
	Image           string    `json:"image,omitempty"`
	Name            string    `json:"name,omitempty"`
	Env             []Env     `json:"env,omitempty"`
	ImagePullPolicy string    `json:"imagePullPolicy,omitempty"`
	Resources       Resources `json:"resources,omitempty"`
}

type Env

type Env struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type Limits

type Limits struct {
	Cpu string `json:"cpu,omitempty"`
}

type Node

type Node struct {
	RequireAll []string `json:"requireAll,omitempty"`
}

type Rancher2

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

func NewRancher2

func NewRancher2(url string, accessKey string, secretKey string, namespaceId string, projectId string) *Rancher2

func (*Rancher2) CreateInstance

func (r *Rancher2) CreateInstance(instance *lib.Instance, dataFields string, tagFields string) (serviceId string, err error)

func (*Rancher2) DeleteInstance

func (r *Rancher2) DeleteInstance(instance *lib.Instance) (err error)

type Request

type Request struct {
	Name        string            `json:"name,omitempty"`
	NamespaceId string            `json:"namespaceId,omitempty"`
	Containers  []Container       `json:"containers,omitempty"`
	Labels      map[string]string `json:"labels,omitempty"`
	Selector    Selector          `json:"selector,omitempty"`
	Scheduling  Scheduling        `json:"scheduling,omitempty"`
}

type Resources

type Resources struct {
	Limits Limits `json:"limits,omitempty"`
}

type Scheduling

type Scheduling struct {
	Node      Node   `json:"node,omitempty"`
	Scheduler string `json:"scheduler,omitempty"`
}

type Selector

type Selector struct {
	MatchLabels map[string]string `json:"matchLabels,omitempty"`
}

Jump to

Keyboard shortcuts

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