wavectl

package
v0.0.0-...-f0fce53 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OutputFormatJSON       = "json"
	OutputFormatJSONPretty = "json-pretty"
	OutputFormatYAML       = "yaml"
	OutputFormatTable      = "table"
)
View Source
const (
	HostPluginActionInstall   = "install"
	HostPluginActionUninstall = "uninstall"
)

Variables

This section is empty.

Functions

func ApplyResource

func ApplyResource(opts ApplyResourceOptions)

ApplyResource 应用资源

func CreateResource

func CreateResource(opts CreateResourceOptions)

CreateResource 创建资源

func DeleteResource

func DeleteResource(opts DeleteResourceOptions)

DeleteResource 删除资源

func GetResource

func GetResource(opts GetResourceOptions)

GetResource 获取资源

func ManageHostPlugin

func ManageHostPlugin(opts HostPluginOptions)

func ToJSON

func ToJSON(obj interface{}, pretty bool) ([]byte, error)

func ToYAML

func ToYAML(obj interface{}) ([]byte, error)

Types

type AppClient

type AppClient struct {
	clientset.ClientSet
}

func (AppClient) Apply

func (c AppClient) Apply(obj core.ApiObject) (core.ApiObject, error)

func (AppClient) Create

func (c AppClient) Create(obj core.ApiObject) (core.ApiObject, error)

func (AppClient) Delete

func (c AppClient) Delete(namespace string, name string) (core.ApiObject, error)

func (AppClient) GetPrint

func (c AppClient) GetPrint(namespace string, name string, format string) error

func (AppClient) Update

func (c AppClient) Update(obj core.ApiObject) (core.ApiObject, error)

type AppInstanceClient

type AppInstanceClient struct {
	clientset.ClientSet
}

func (AppInstanceClient) Apply

func (AppInstanceClient) Create

func (AppInstanceClient) Delete

func (c AppInstanceClient) Delete(namespace string, name string) (core.ApiObject, error)

func (AppInstanceClient) GetPrint

func (c AppInstanceClient) GetPrint(namespace string, name string, format string) error

func (AppInstanceClient) Update

type ApplyResourceOptions

type ApplyResourceOptions struct {
	Endpoint string
	File     string
}

ApplyResourceOptions 资源应用配置项

type ConfigMapClient

type ConfigMapClient struct {
	clientset.ClientSet
}

func (ConfigMapClient) Apply

func (ConfigMapClient) Create

func (c ConfigMapClient) Create(obj core.ApiObject) (core.ApiObject, error)

func (ConfigMapClient) Delete

func (c ConfigMapClient) Delete(namespace string, name string) (core.ApiObject, error)

func (ConfigMapClient) GetPrint

func (c ConfigMapClient) GetPrint(namespace string, name string, format string) error

func (ConfigMapClient) Update

func (c ConfigMapClient) Update(obj core.ApiObject) (core.ApiObject, error)

type CreateResourceOptions

type CreateResourceOptions struct {
	Endpoint string
	File     string
}

CreateResourceOptions 创建资源配置项

type DeleteResourceOptions

type DeleteResourceOptions struct {
	Endpoint     string
	Namespace    string
	Resource     string
	ResourceName string
	File         string
}

DeleteResourceOptions 资源删除配置项

type GetResourceOptions

type GetResourceOptions struct {
	Endpoint     string
	Resource     string
	ResourceName string
	Namespace    string
	Format       string
}

GetResourceOptions 获取资源配置项

type HostClient

type HostClient struct {
	clientset.ClientSet
}

func (HostClient) Apply

func (c HostClient) Apply(obj core.ApiObject) (core.ApiObject, error)

func (HostClient) Create

func (c HostClient) Create(obj core.ApiObject) (core.ApiObject, error)

func (HostClient) Delete

func (c HostClient) Delete(namespace string, name string) (core.ApiObject, error)

func (HostClient) GetPrint

func (c HostClient) GetPrint(namespace string, name string, format string) error

func (HostClient) Update

func (c HostClient) Update(obj core.ApiObject) (core.ApiObject, error)

type HostPluginClient

type HostPluginClient struct {
	clientset.ClientSet
}

func (HostPluginClient) Install

func (c HostPluginClient) Install(hostName string, pluginName string, pluginVersion string, force bool) error

Install 安装主机插件

func (HostPluginClient) Uninstall

func (c HostPluginClient) Uninstall(hostName string, pluginName string, force bool) error

Install 卸载主机插件

type HostPluginOptions

type HostPluginOptions struct {
	Endpoint      string
	Action        string
	Host          string
	PluginName    string
	PluginVersion string
	Force         bool
}

HostPluginOptions 主机插件操作配置项

type ResourceManager

type ResourceManager interface {
	GetPrint(namespace string, name string, format string) error
	Apply(obj core.ApiObject) (core.ApiObject, error)
	Create(obj core.ApiObject) (core.ApiObject, error)
	Update(obj core.ApiObject) (core.ApiObject, error)
	Delete(namespace string, name string) (core.ApiObject, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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