Documentation ¶
Index ¶
- Variables
- type BindingContextController
- func (b *BindingContextController) ChangeState(newState ...string) (string, error)
- func (b *BindingContextController) RegisterCRD(group, version, kind string, namespaced bool)
- func (b *BindingContextController) Run() (string, error)
- func (b *BindingContextController) RunSchedule(crontab string) (string, error)
- type StateController
Constants ¶
This section is empty.
Variables ¶
View Source
var FakeCluster *fake.FakeCluster
FakeCluster is global for now. It can be encapsulated in BindingContextController lately.
Functions ¶
This section is empty.
Types ¶
type BindingContextController ¶
type BindingContextController struct { HookCtrl controller.HookController HookMap map[string]string HookConfig string InitialState string Controller *StateController KubeEventsManager kubeeventsmanager.KubeEventsManager ScheduleManager schedulemanager.ScheduleManager Context context.Context Cancel context.CancelFunc }
func NewBindingContextController ¶
func NewBindingContextController(config, initialState string) (*BindingContextController, error)
func (*BindingContextController) ChangeState ¶
func (b *BindingContextController) ChangeState(newState ...string) (string, error)
func (*BindingContextController) RegisterCRD ¶
func (b *BindingContextController) RegisterCRD(group, version, kind string, namespaced bool)
RegisterCRD registers custom resources for the cluster
func (*BindingContextController) Run ¶
func (b *BindingContextController) Run() (string, error)
BindingContextsGenerator generates binding contexts for hook tests
func (*BindingContextController) RunSchedule ¶
func (b *BindingContextController) RunSchedule(crontab string) (string, error)
type StateController ¶
StateController holds objects state for FakeCluster
func NewStateController ¶
func NewStateController() *StateController
NewStateController creates controller to apply state changes
func (*StateController) ChangeState ¶
func (c *StateController) ChangeState(newRawState string) error
ChangeState apply changes to current objects state
func (*StateController) SetInitialState ¶
func (c *StateController) SetInitialState(initialState string) error
Click to show internal directories.
Click to hide internal directories.