rancher_api

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 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 LaunchConfig

type LaunchConfig struct {
	ImageUuid   string            `json:"imageUuid,omitempty"`
	Environment map[string]string `json:"environment"`
	Labels      map[string]string `json:"labels"`
}

type Rancher

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

func NewRancher

func NewRancher(url string, accessKey string, secretKey string, stackId string) *Rancher

func (Rancher) CreateInstance

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

func (Rancher) DeleteInstance

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

type Request

type Request struct {
	Type          string `json:"type,omitempty"`
	Name          string `json:"name,omitempty"`
	StackId       string `json:"stackId,omitempty"`
	Scale         int    `json:"scale,omitempty"`
	StartOnCreate bool   `json:"startOnCreate,omitempty"`
	LaunchConfig  `json:"launchConfig,omitempty"`
}

type Service

type Service struct {
	Id           string `json:"id"`
	LaunchConfig `json:"launchConfig,omitempty"`
}

type ServiceCollection

type ServiceCollection struct {
	Data []Service `json:"data"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳