atom

package
v0.0.0-...-173f4c4 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

README

atom

Transactional updates and rollbacks of Kubernetes objects

State Machine

                                        ┌ ─ ─ ─ updating  ─ ─ ┐

                                        │  ┌───────────────┐  │
                                           │    Pending    │◀───────────────────────────────┐
                                        │  └───────┬───────┘  │                             │
                                                   ▼                                        │
                                        │  ┌───────────────┐  │                             │
                                           │   Updating    ├──────────────────┐             │
                                        │  └───────┬───────┘  │               │             │
                                                   │                          │             │
                                        └ ─ ─ ─ ─ ─│─ ─ ─ ─ ─ ┘               │             │
                                                   │                          │             │
           ┌───────────────────┬───────────────────┤                          │             │
┌ ─ ─ ─ ─ ─│─ ─ ─ ─ ─ ─ ─ ─ ─ ─│─ ─ ─ ─ ─ ─ ─ ─ ─ ─│─ ─ ─ ─ ─ ┐    ┌ ─ ─ ─ ─ ─│─ ─ ─ ─ ─ ┐  │
           ▼                   ▼                   ▼                          ▼             │
│  ┌───────────────┐   ┌───────────────┐   ┌───────────────┐  │    │  ┌───────────────┐  │  │
   │   Cancelled   │   │   Deadline    │   │     Error     │          │    Running    ├─────┤
│  └───────┬───────┘   └───────┬───────┘   └───────┬───────┘  │    │  └───────────────┘  │  │
           │                   │                   │                                        │
│          └───────────────────┼───────────────────┘          │    │  ┌───────────────┐  │  │
                               ▼                                 ┌───▶│   Reverted    ├─────┤
│                      ┌───────────────┐                      │  │ │  └───────────────┘  │  │
                       │   Rollback    ├─────────────────────────┤                          │
│                      └───────────────┘                      │  │ │  ┌───────────────┐  │  │
                                                                 └───▶│    Failure    ├─────┘
└ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ rollback  ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘    │  └───────────────┘  │

                                                                   └ ─ ─ ─ running ─ ─ ─ ┘

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(namespace, name, release string, template []byte, timeout int32) error

func Initialize

func Initialize() error

Types

type AtomController

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

func NewController

func NewController(cfg *rest.Config) (*AtomController, error)

func (*AtomController) Add

func (c *AtomController) Add(obj interface{}) error

func (*AtomController) Client

func (c *AtomController) Client() kubernetes.Interface

func (*AtomController) Delete

func (c *AtomController) Delete(obj interface{}) error

func (*AtomController) Informer

func (c *AtomController) Informer() cache.SharedInformer

func (*AtomController) ListOptions

func (c *AtomController) ListOptions(opts *am.ListOptions)

func (*AtomController) Run

func (c *AtomController) Run()

func (*AtomController) Start

func (c *AtomController) Start() error

func (*AtomController) Stop

func (c *AtomController) Stop() error

func (*AtomController) Update

func (c *AtomController) Update(prev, cur interface{}) error

type Client

type Client struct {
	Atom av.Interface
	// contains filtered or unexported fields
}

func New

func New(cfg *rest.Config) (*Client, error)

func (*Client) Apply

func (c *Client) Apply(ns, name, release string, template []byte, timeout int32) error

func (*Client) Cancel

func (c *Client) Cancel(ns, name string) error

func (*Client) Status

func (c *Client) Status(ns, name string) (string, string, error)

type Interface

type Interface interface {
	Apply(ns, name, release string, template []byte, timeout int32) error
	Cancel(ns, name string) error
	Status(ns, name string) (string, string, error)
}

type MockInterface

type MockInterface struct {
	mock.Mock
}

MockInterface is an autogenerated mock type for the Interface type

func (*MockInterface) Apply

func (_m *MockInterface) Apply(ns string, name string, release string, template []byte, timeout int32) error

Apply provides a mock function with given fields: ns, name, release, template, timeout

func (*MockInterface) Cancel

func (_m *MockInterface) Cancel(ns string, name string) error

Cancel provides a mock function with given fields: ns, name

func (*MockInterface) Status

func (_m *MockInterface) Status(ns string, name string) (string, string, error)

Status provides a mock function with given fields: ns, name

Directories

Path Synopsis
pkg
apis/atom/v1
+groupName=atom.convox.com
+groupName=atom.convox.com
client/clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
client/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
client/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
client/clientset/versioned/typed/atom/v1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
client/clientset/versioned/typed/atom/v1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.

Jump to

Keyboard shortcuts

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