rancher_api

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 9 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, error)

func (Rancher) ContainerExists

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

func (Rancher) CreateContainer

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