Documentation
¶
Index ¶
Constants ¶
View Source
const MaxWait = time.Duration(time.Second * 10)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventHandler ¶
type EventHandler func(*Event, *client.RancherClient) error
Defines the function "interface" that handlers must conform to.
type EventRouter ¶
type EventRouter struct {
// contains filtered or unexported fields
}
func NewEventRouter ¶
func NewEventRouter(name string, priority int, apiURL string, accessKey string, secretKey string, apiClient *client.RancherClient, eventHandlers map[string]EventHandler, resourceName string, workerCount int) (*EventRouter, error)
func (*EventRouter) Start ¶
func (router *EventRouter) Start(ready chan<- bool) error
The difference between Start and StartWithoutCreate is a matter of making this event router more generally usable. The current go-machine-service implementation creates the necessary ExternalHandler upon start up. This router has been refactor to be used in situations where creating an externalHandler is not desired. This allows the router to be used for Agent connections and for ExternalHandlers that are created outside of this router (we want to refactor gms to be that way).
func (*EventRouter) StartWithoutCreate ¶ added in v0.19.0
func (router *EventRouter) StartWithoutCreate(ready chan<- bool) error
func (*EventRouter) Stop ¶
func (router *EventRouter) Stop() (err error)
type ProcessConfig ¶ added in v0.4.0
type ReplyEvent ¶
type ReplyEvent struct { Name string `json:"name"` PreviousIds []string `json:"previousIds"` Data map[string]interface{} `json:"data"` }
func NewReplyEvent ¶
func NewReplyEvent(replyTo string, eventID string) *ReplyEvent
Click to show internal directories.
Click to hide internal directories.