Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterConfigBinder(name string, binder ConfigBinder)
- type ClusterConfig
- type ConfigBinder
- type Context
- func (c *Context) BindFlags(fs *pflag.FlagSet)
- func (c *Context) BindNamedFlags(fss *cliflag.NamedFlagSets)
- func (c *Context) BuildCluster() error
- func (c *Context) BuildTask() error
- func (c *Context) ClusterConfig() *ClusterConfig
- func (c *Context) KubernetesClient() *kubernetes.Clientset
- func (c *Context) KubernetesRestClient() *rest.Config
- func (c *Context) MiscConfig() *MiscConfig
- func (c *Context) TaskConfig() *TaskConfig
- func (c *Context) UIConfig() *UIConfig
- func (c *Context) Validate() error
- type MiscConfig
- type NamedConfigBinder
- type TaskConfig
- type UIConfig
Constants ¶
View Source
const ( NetworkPluginFlannel = "flannel" NetworkPluginCalico = "calico" NetworkPluginTerway = "terway" )
Variables ¶
View Source
var SkoopContext = &Context{ Ctx: &sync.Map{}, }
Functions ¶
func RegisterConfigBinder ¶
func RegisterConfigBinder(name string, binder ConfigBinder)
Types ¶
type ClusterConfig ¶
type ClusterConfig struct { KubeConfigPath string CloudProvider string ClusterCIDRString string ClusterCIDR *net.IPNet NetworkPlugin string ProxyMode string IPCache *k8s.IPCache }
func (*ClusterConfig) BindFlags ¶
func (cc *ClusterConfig) BindFlags(fs *pflag.FlagSet)
func (*ClusterConfig) Validate ¶
func (cc *ClusterConfig) Validate() error
type ConfigBinder ¶
type Context ¶
func (*Context) BindNamedFlags ¶
func (c *Context) BindNamedFlags(fss *cliflag.NamedFlagSets)
func (*Context) BuildCluster ¶
func (*Context) ClusterConfig ¶
func (c *Context) ClusterConfig() *ClusterConfig
func (*Context) KubernetesClient ¶
func (c *Context) KubernetesClient() *kubernetes.Clientset
func (*Context) KubernetesRestClient ¶
func (*Context) MiscConfig ¶
func (c *Context) MiscConfig() *MiscConfig
func (*Context) TaskConfig ¶
func (c *Context) TaskConfig() *TaskConfig
type MiscConfig ¶
type MiscConfig struct {
Version bool
}
func (*MiscConfig) BindFlags ¶
func (m *MiscConfig) BindFlags(fs *pflag.FlagSet)
func (*MiscConfig) Validate ¶
func (m *MiscConfig) Validate() error
type NamedConfigBinder ¶
type NamedConfigBinder struct { Name string Binder ConfigBinder }
type TaskConfig ¶
type TaskConfig struct { Source string `json:"source"` Destination struct { Address string `json:"address"` Port uint16 `json:"port"` } `json:"destination"` SourceEndpoint model.Endpoint `json:"source_endpoint"` DstEndpoint model.Endpoint `json:"dst_endpoint"` Protocol string `json:"protocol"` }
func (*TaskConfig) BindFlags ¶
func (tc *TaskConfig) BindFlags(fs *pflag.FlagSet)
func (*TaskConfig) Validate ¶
func (tc *TaskConfig) Validate() error
Click to show internal directories.
Click to hide internal directories.