rancher_api

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2026 License: Apache-2.0 Imports: 10 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 New

func New(config config.Config) *Rancher

func (Rancher) ContainerExists

func (r Rancher) ContainerExists(id string, _ *bool) (exists bool, err error)

func (Rancher) CreateContainer

func (r Rancher) CreateContainer(name string, image string, env map[string]string, restart bool, _ string, _ string) (id string, err error)

func (Rancher) Disconnect

func (r Rancher) Disconnect() (err error)

func (Rancher) GetContainerStatus added in v0.1.0

func (r Rancher) GetContainerStatus(_ string, _ *bool) (status model.InstanceStatus, err error)

func (Rancher) GetContainerStatuses added in v0.1.0

func (r Rancher) GetContainerStatuses() (statuses map[string]model.InstanceStatus, err error)

func (Rancher) RemoveContainer

func (r Rancher) RemoveContainer(id string) (err error)

func (Rancher) UpdateContainer

func (r Rancher) UpdateContainer(id string, name string, image string, env map[string]string, restart bool, _ string, _ string, _ bool) (newId string, 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