{"modulePath":"github.com/lukasmacko/vpp","version":"v0.0.0-20190503140738-f5d8be923991","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package main\n\n## Functions\n\n```go\nfunc NewExampleEventHandler(name string) api.EventHandler\n```\nNewExampleEventHandler is the constructor for ExampleEventHandler.\n\n## Types\n\n```go\ntype ExampleEventHandler struct {\n\t// contains filtered or unexported fields\n}\n```\nExampleEventHandler is a mock event handler.\n\n```go\nfunc (h *ExampleEventHandler) HandlesEvent(event api.Event) bool\n```\nHandlesEvent is used by Controller to check if the event is being handled by this handler.\n\n```go\nfunc (h *ExampleEventHandler) Resync(event api.Event, kubeStateData api.KubeStateData, resyncCount int, txn api.ResyncOperations) error\n```\nResync is called by Controller to handle event that requires full re-synchronization. For startup resync, resyncCount is 1. Higher counter values identify run-time resync.\n\n```go\nfunc (h *ExampleEventHandler) Revert(event api.Event) error\n```\nRevert is called to revert already executed internal changes (in the plugin itself, not in VPP/Linux network stack) for a RevertOnFailure event that has failed in the processing.\n\n```go\nfunc (h *ExampleEventHandler) String() string\n```\nString identifies the handler for the Controller and in the logs. Note: Plugins already implement Stringer.\n\n```go\nfunc (h *ExampleEventHandler) Update(event api.Event, txn api.UpdateOperations) (changeDescription string, err error)\n```\nUpdate is called by Controller to handle event that can be reacted to by an incremental change. \\\u003cchangeDescription\u003e should be human-readable description of changes that have to be performed (via txn or internally) - can be empty.\n\n```go\ntype ExamplePlugin struct {\n\tController *plugin.Controller\n}\n```\nExamplePlugin is the main plugin in this example.\n\n```go\nfunc (p *ExamplePlugin) Close() error\n```\nClose releases allocated resources.\n\n```go\nfunc (p *ExamplePlugin) Init() error\n```\nInit handles initialization phase.\n\n```go\nfunc (p *ExamplePlugin) String() string\n```\nString returns plugin name\n\n","path":"github.com/lukasmacko/vpp/plugins/controller/example","name":"main","synopsis":"","isRedistributable":true}
