Documentation
¶
Index ¶
- func GetOrCreateSharedValue(ctx context.Context, key interface{}, create func() interface{}) interface{}
- func GetSharedValue(ctx context.Context, key interface{}) interface{}
- func NewCommand(ctx context.Context, use, short, long string, def *Definition) *cobra.Command
- func Start(use, short, long string)
- type Configuration
- func (this Configuration) ByDefault() Configuration
- func (this Configuration) Definition() *Definition
- func (this Configuration) MustRegisterCluster(reg cluster.Registerable) cluster.RegistrationInterface
- func (this Configuration) MustRegisterController(reg controller.Registerable, groups ...string) controller.RegistrationInterface
- func (this Configuration) MustRegisterGroup(name string) *groups.Configuration
- func (this Configuration) MustRegisterMapping(reg mappings.Registerable) mappings.RegistrationInterface
- func (this Configuration) RegisterCluster(reg cluster.Registerable) error
- func (this Configuration) RegisterController(reg controller.Registerable, groups ...string) error
- func (this Configuration) RegisterGroup(name string) (*groups.Configuration, error)
- func (this Configuration) RegisterMapping(reg mappings.Registerable) error
- func (this Configuration) Start(use, short string)
- type Controller
- type ControllerManager
- func (c *ControllerManager) GetCluster(name string) cluster.Interface
- func (c *ControllerManager) GetClusters() cluster.Clusters
- func (c *ControllerManager) GetConfig() *config.Config
- func (c *ControllerManager) GetContext() context.Context
- func (c *ControllerManager) GetName() string
- func (c *ControllerManager) Run() error
- type Definition
- func (this *Definition) ClusterDefinitions() cluster.Definitions
- func (this *Definition) ControllerDefinitions() controller.Definitions
- func (this *Definition) ExtendConfig(cfg *config.Config)
- func (this *Definition) GetDescription() string
- func (this *Definition) GetMappingsFor(name string) (mappings.Definition, error)
- func (this *Definition) GetName() string
- func (this *Definition) Groups() groups.Definitions
- func (this *Definition) Registrations(names ...string) (controller.Registrations, error)
- type StartupGroup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetOrCreateSharedValue ¶
func GetSharedValue ¶
func NewCommand ¶
Types ¶
type Configuration ¶
type Configuration struct {
// contains filtered or unexported fields
}
func (Configuration) ByDefault ¶
func (this Configuration) ByDefault() Configuration
func (Configuration) Definition ¶
func (this Configuration) Definition() *Definition
func (Configuration) MustRegisterCluster ¶
func (this Configuration) MustRegisterCluster(reg cluster.Registerable) cluster.RegistrationInterface
func (Configuration) MustRegisterController ¶
func (this Configuration) MustRegisterController(reg controller.Registerable, groups ...string) controller.RegistrationInterface
func (Configuration) MustRegisterGroup ¶
func (this Configuration) MustRegisterGroup(name string) *groups.Configuration
func (Configuration) MustRegisterMapping ¶
func (this Configuration) MustRegisterMapping(reg mappings.Registerable) mappings.RegistrationInterface
func (Configuration) RegisterCluster ¶
func (this Configuration) RegisterCluster(reg cluster.Registerable) error
func (Configuration) RegisterController ¶
func (this Configuration) RegisterController(reg controller.Registerable, groups ...string) error
func (Configuration) RegisterGroup ¶
func (this Configuration) RegisterGroup(name string) (*groups.Configuration, error)
func (Configuration) RegisterMapping ¶
func (this Configuration) RegisterMapping(reg mappings.Registerable) error
func (Configuration) Start ¶
func (this Configuration) Start(use, short string)
type Controller ¶
type Controller interface {
GetName() string
Owning() controller.ResourceKey
GetDefinition() controller.Definition
GetClusterHandler(name string) (*controller.ClusterHandler, error)
Check() error
Prepare() error
Run()
}
type ControllerManager ¶
type ControllerManager struct {
// contains filtered or unexported fields
}
func Get ¶
func Get(ctx context.Context) *ControllerManager
func NewControllerManager ¶
func NewControllerManager(ctx context.Context, def *Definition) (*ControllerManager, error)
func (*ControllerManager) GetCluster ¶
func (c *ControllerManager) GetCluster(name string) cluster.Interface
func (*ControllerManager) GetClusters ¶
func (c *ControllerManager) GetClusters() cluster.Clusters
func (*ControllerManager) GetConfig ¶
func (c *ControllerManager) GetConfig() *config.Config
func (*ControllerManager) GetContext ¶
func (c *ControllerManager) GetContext() context.Context
func (*ControllerManager) GetName ¶
func (c *ControllerManager) GetName() string
func (*ControllerManager) Run ¶
func (c *ControllerManager) Run() error
type Definition ¶
type Definition struct {
// contains filtered or unexported fields
}
func DefaultDefinition ¶
func DefaultDefinition(name, desc string) *Definition
func (*Definition) ClusterDefinitions ¶
func (this *Definition) ClusterDefinitions() cluster.Definitions
func (*Definition) ControllerDefinitions ¶
func (this *Definition) ControllerDefinitions() controller.Definitions
func (*Definition) ExtendConfig ¶
func (this *Definition) ExtendConfig(cfg *config.Config)
func (*Definition) GetDescription ¶
func (this *Definition) GetDescription() string
func (*Definition) GetMappingsFor ¶
func (this *Definition) GetMappingsFor(name string) (mappings.Definition, error)
func (*Definition) GetName ¶
func (this *Definition) GetName() string
func (*Definition) Groups ¶
func (this *Definition) Groups() groups.Definitions
func (*Definition) Registrations ¶
func (this *Definition) Registrations(names ...string) (controller.Registrations, error)
type StartupGroup ¶
type StartupGroup interface {
Startup() error
Add(c Controller)
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.