Documentation
¶
Index ¶
- Constants
- type Context
- type Controller
- type PluginInput
- type PluginInputGRPC
- type PluginOutput
- type ScheduleFunc
- func NewAnsiblePluginScheduler(plugin client.Plugin) (ScheduleFunc, error)
- func NewCommandPluginScheduler(plugin client.Plugin, logIpStack util.IPStack, logAddress string, logPort int) (ScheduleFunc, error)
- func NewPluginScheduler(plugin client.Plugin, logIpStack util.IPStack, logAddress string, logPort int) (ScheduleFunc, error)
- type Schedulers
- type SchedulersMap
- type Scheduling
- func (self *Scheduling) GetSchedulers(gvk tkoutil.GVK) (Schedulers, error)
- func (self *Scheduling) NewContext(siteId string, sitePackage util.Package, ...) *Context
- func (self *Scheduling) RegisterScheduler(gvk tkoutil.GVK, schedule ScheduleFunc)
- func (self *Scheduling) ResetPluginCache()
- func (self *Scheduling) ScheduleSite(siteInfo client.SiteInfo) error
- func (self *Scheduling) ScheduleSites() error
Constants ¶
View Source
const FIFOPrefix = "tko-scheduling-"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct { Scheduling *Scheduling Log commonlog.Logger SiteID string SitePackage util.Package TargetResourceIdentifer util.ResourceIdentifier Deployments map[string]util.Package }
func (*Context) ToPluginInput ¶
func (self *Context) ToPluginInput(logFile string, logAddressPort string) PluginInput
type Controller ¶
type Controller struct { *util.Controller Scheduling *Scheduling // contains filtered or unexported fields }
func NewController ¶
func NewController(scheduling *Scheduling, interval time.Duration, log commonlog.Logger) *Controller
type PluginInput ¶
type PluginInput struct { GRPC PluginInputGRPC `yaml:"grpc"` LogFile string `yaml:"logFile"` LogAddressPort string `yaml:"logAddressPort"` SiteID string `yaml:"siteId"` SitePackage tkoutil.Package `yaml:"sitePackage"` TargetResourceIdentifer tkoutil.ResourceIdentifier `yaml:"targetResourceIdentifier"` Deployments map[string]tkoutil.Package `yaml:"deployments"` }
type PluginInputGRPC ¶
type PluginOutput ¶
type PluginOutput struct {
Error string `yaml:"error,omitempty"`
}
type ScheduleFunc ¶
type ScheduleFunc func(context contextpkg.Context, schedulingContext *Context) error
func NewAnsiblePluginScheduler ¶
func NewAnsiblePluginScheduler(plugin client.Plugin) (ScheduleFunc, error)
func NewPluginScheduler ¶
type Schedulers ¶
type Schedulers []ScheduleFunc
type SchedulersMap ¶
type SchedulersMap map[tkoutil.GVK]Schedulers
type Scheduling ¶
type Scheduling struct { Client *clientpkg.Client Timeout time.Duration Log commonlog.Logger LogIPStack util.IPStack LogAddress string LogPort int // contains filtered or unexported fields }
func NewScheduling ¶
func (*Scheduling) GetSchedulers ¶
func (self *Scheduling) GetSchedulers(gvk tkoutil.GVK) (Schedulers, error)
func (*Scheduling) NewContext ¶
func (*Scheduling) RegisterScheduler ¶
func (self *Scheduling) RegisterScheduler(gvk tkoutil.GVK, schedule ScheduleFunc)
func (*Scheduling) ResetPluginCache ¶
func (self *Scheduling) ResetPluginCache()
func (*Scheduling) ScheduleSite ¶
func (self *Scheduling) ScheduleSite(siteInfo client.SiteInfo) error
func (*Scheduling) ScheduleSites ¶
func (self *Scheduling) ScheduleSites() error
Click to show internal directories.
Click to hide internal directories.