Documentation ¶
Index ¶
- Constants
- Variables
- type APIResponse
- type APIResponseMeta
- type AddScheduledTask
- type AvailablePlugin
- type Body
- type DeletePluginConfigItem
- type DynamicElement
- type Error
- type LoadedPlugin
- type Metric
- type MetricReturned
- type MetricsReturned
- type PluginConfigItem
- type PluginList
- type PluginReturned
- type PluginUnloaded
- type PluginsLoaded
- type PolicyTable
- type ScheduledTask
- type ScheduledTaskEnabled
- type ScheduledTaskListReturned
- type ScheduledTaskRemoved
- type ScheduledTaskReturned
- type ScheduledTaskStarted
- type ScheduledTaskStopped
- type ScheduledTaskWatchingEnded
- type SetPluginConfigItem
- type StreamedMetric
- type StreamedMetrics
- type StreamedTaskEvent
- type TribeAddAgreement
- type TribeDeleteAgreement
- type TribeGetAgreement
- type TribeJoinAgreement
- type TribeLeaveAgreement
- type TribeListAgreement
- type TribeMemberList
- type TribeMemberShow
Constants ¶
View Source
const ( PluginConfigItemType = "config_plugin_item_returned" SetPluginConfigItemType = "config_plugin_item_created" DeletePluginConfigItemType = "config_plugin_item_deleted" )
View Source
const ( MetricsReturnedType = "metrics_returned" MetricReturnedType = "metric_returned" )
View Source
const ( PluginsLoadedType = "plugins_loaded" PluginUnloadedType = "plugin_unloaded" PluginListType = "plugin_list_returned" PluginReturnedType = "plugin_returned" )
View Source
const ( ScheduledTaskListReturnedType = "scheduled_task_list_returned" ScheduledTaskReturnedType = "scheduled_task_returned" AddScheduledTaskType = "scheduled_task_created" ScheduledTaskType = "scheduled_task" ScheduledTaskStartedType = "scheduled_task_started" ScheduledTaskStoppedType = "scheduled_task_stopped" ScheduledTaskRemovedType = "scheduled_task_removed" ScheduledTaskWatchingEndedType = "schedule_task_watch_ended" ScheduledTaskEnabledType = "scheduled_task_enabled" // Event types for task watcher streaming TaskWatchStreamOpen = "stream-open" TaskWatchMetricEvent = "metric-event" TaskWatchTaskDisabled = "task-disabled" TaskWatchTaskStarted = "task-started" TaskWatchTaskStopped = "task-stopped" )
View Source
const ( TribeListAgreementType = "tribe_agreement_list_returned" TribeGetAgreementType = "tribe_agreement_returned" TribeAddAgreementType = "tribe_agreement_created" TribeDeleteAgreementType = "tribe_agreement_deleted" TribeAddMemberType = "tribe_member_added" TribeJoinAgreementType = "tribe_agreement_joined" TribeLeaveAgreementType = "tribe_agreement_left" TribeMemberListType = "tribe_member_list_returned" TribeMemberShowType = "tribe_member_details_returned" )
View Source
const (
ErrorType = "error"
)
Variables ¶
View Source
var (
ErrCannotUnmarshalBody = errors.New("Cannot unmarshal body: invalid type")
)
Functions ¶
This section is empty.
Types ¶
type APIResponse ¶
type APIResponse struct { Meta *APIResponseMeta `json:"meta"` Body Body `json:"body"` JSONResponse string `json:"-"` }
func (*APIResponse) UnmarshalJSON ¶
func (a *APIResponse) UnmarshalJSON(b []byte) error
type APIResponseMeta ¶
type AddScheduledTask ¶
type AddScheduledTask ScheduledTask
func AddSchedulerTaskFromTask ¶
func AddSchedulerTaskFromTask(t core.Task) *AddScheduledTask
func (*AddScheduledTask) ResponseBodyMessage ¶
func (s *AddScheduledTask) ResponseBodyMessage() string
func (*AddScheduledTask) ResponseBodyType ¶
func (s *AddScheduledTask) ResponseBodyType() string
type AvailablePlugin ¶
type Body ¶
type DeletePluginConfigItem ¶
type DeletePluginConfigItem PluginConfigItem
func (*DeletePluginConfigItem) ResponseBodyMessage ¶
func (t *DeletePluginConfigItem) ResponseBodyMessage() string
func (*DeletePluginConfigItem) ResponseBodyType ¶
func (t *DeletePluginConfigItem) ResponseBodyType() string
type DynamicElement ¶
type Error ¶
Unsuccessful generic response to a failed API call
func FromSnapError ¶
func FromSnapErrors ¶
func (*Error) ResponseBodyMessage ¶
func (*Error) ResponseBodyType ¶
type LoadedPlugin ¶
type Metric ¶
type Metric struct { LastAdvertisedTimestamp int64 `json:"last_advertised_timestamp,omitempty"` Namespace string `json:"namespace,omitempty"` Version int `json:"version,omitempty"` Dynamic bool `json:"dynamic"` DynamicElements []DynamicElement `json:"dynamic_elements,omitempty"` Description string `json:"description,omitempty"` Unit string `json:"unit,omitempty"` Policy []PolicyTable `json:"policy,omitempty"` Href string `json:"href"` }
type MetricReturned ¶
type MetricReturned struct {
Metric *Metric
}
func (*MetricReturned) ResponseBodyMessage ¶
func (m *MetricReturned) ResponseBodyMessage() string
func (*MetricReturned) ResponseBodyType ¶
func (m *MetricReturned) ResponseBodyType() string
type MetricsReturned ¶
type MetricsReturned []Metric
func NewMetricsReturned ¶
func NewMetricsReturned() MetricsReturned
func (MetricsReturned) Len ¶
func (m MetricsReturned) Len() int
func (MetricsReturned) Less ¶
func (m MetricsReturned) Less(i, j int) bool
func (MetricsReturned) ResponseBodyMessage ¶
func (m MetricsReturned) ResponseBodyMessage() string
func (MetricsReturned) ResponseBodyType ¶
func (m MetricsReturned) ResponseBodyType() string
func (MetricsReturned) Swap ¶
func (m MetricsReturned) Swap(i, j int)
type PluginConfigItem ¶
type PluginConfigItem struct {
cdata.ConfigDataNode
}
func (*PluginConfigItem) ResponseBodyMessage ¶
func (t *PluginConfigItem) ResponseBodyMessage() string
func (*PluginConfigItem) ResponseBodyType ¶
func (t *PluginConfigItem) ResponseBodyType() string
type PluginList ¶
type PluginList struct { LoadedPlugins []LoadedPlugin `json:"loaded_plugins,omitempty"` AvailablePlugins []AvailablePlugin `json:"available_plugins,omitempty"` }
func (*PluginList) ResponseBodyMessage ¶
func (p *PluginList) ResponseBodyMessage() string
func (*PluginList) ResponseBodyType ¶
func (p *PluginList) ResponseBodyType() string
type PluginReturned ¶
type PluginReturned LoadedPlugin
func (*PluginReturned) ResponseBodyMessage ¶
func (p *PluginReturned) ResponseBodyMessage() string
func (*PluginReturned) ResponseBodyType ¶
func (p *PluginReturned) ResponseBodyType() string
type PluginUnloaded ¶
type PluginUnloaded struct { Name string `json:"name"` Version int `json:"version"` Type string `json:"type"` }
Successful response to the unloading of a plugin
func (*PluginUnloaded) ResponseBodyMessage ¶
func (u *PluginUnloaded) ResponseBodyMessage() string
func (*PluginUnloaded) ResponseBodyType ¶
func (u *PluginUnloaded) ResponseBodyType() string
type PluginsLoaded ¶
type PluginsLoaded struct {
LoadedPlugins []LoadedPlugin `json:"loaded_plugins"`
}
Successful response to the loading of a plugins
func (*PluginsLoaded) ResponseBodyMessage ¶
func (p *PluginsLoaded) ResponseBodyMessage() string
func (*PluginsLoaded) ResponseBodyType ¶
func (p *PluginsLoaded) ResponseBodyType() string
type PolicyTable ¶
type ScheduledTask ¶
type ScheduledTask struct { ID string `json:"id"` Name string `json:"name"` Deadline string `json:"deadline"` Workflow *wmap.WorkflowMap `json:"workflow,omitempty"` Schedule *request.Schedule `json:"schedule,omitempty"` CreationTimestamp int64 `json:"creation_timestamp,omitempty"` LastRunTimestamp int64 `json:"last_run_timestamp,omitempty"` HitCount int `json:"hit_count,omitempty"` MissCount int `json:"miss_count,omitempty"` FailedCount int `json:"failed_count,omitempty"` LastFailureMessage string `json:"last_failure_message,omitempty"` State string `json:"task_state"` Href string `json:"href"` }
func SchedulerTaskFromTask ¶
func SchedulerTaskFromTask(t core.Task) *ScheduledTask
func (*ScheduledTask) CreationTime ¶
func (s *ScheduledTask) CreationTime() time.Time
func (*ScheduledTask) ResponseBodyMessage ¶
func (s *ScheduledTask) ResponseBodyMessage() string
func (*ScheduledTask) ResponseBodyType ¶
func (s *ScheduledTask) ResponseBodyType() string
type ScheduledTaskEnabled ¶
type ScheduledTaskEnabled struct {
AddScheduledTask
}
func (*ScheduledTaskEnabled) ResponseBodyMessage ¶
func (s *ScheduledTaskEnabled) ResponseBodyMessage() string
func (*ScheduledTaskEnabled) ResponseBodyType ¶
func (s *ScheduledTaskEnabled) ResponseBodyType() string
type ScheduledTaskListReturned ¶
type ScheduledTaskListReturned struct {
ScheduledTasks []ScheduledTask
}
func (*ScheduledTaskListReturned) Len ¶
func (s *ScheduledTaskListReturned) Len() int
func (*ScheduledTaskListReturned) Less ¶
func (s *ScheduledTaskListReturned) Less(i, j int) bool
func (*ScheduledTaskListReturned) ResponseBodyMessage ¶
func (s *ScheduledTaskListReturned) ResponseBodyMessage() string
func (*ScheduledTaskListReturned) ResponseBodyType ¶
func (s *ScheduledTaskListReturned) ResponseBodyType() string
func (*ScheduledTaskListReturned) Swap ¶
func (s *ScheduledTaskListReturned) Swap(i, j int)
type ScheduledTaskRemoved ¶
type ScheduledTaskRemoved struct { // TODO return resource ID string `json:"id"` }
func (*ScheduledTaskRemoved) ResponseBodyMessage ¶
func (s *ScheduledTaskRemoved) ResponseBodyMessage() string
func (*ScheduledTaskRemoved) ResponseBodyType ¶
func (s *ScheduledTaskRemoved) ResponseBodyType() string
type ScheduledTaskReturned ¶
type ScheduledTaskReturned struct {
AddScheduledTask
}
func (*ScheduledTaskReturned) ResponseBodyMessage ¶
func (s *ScheduledTaskReturned) ResponseBodyMessage() string
func (*ScheduledTaskReturned) ResponseBodyType ¶
func (s *ScheduledTaskReturned) ResponseBodyType() string
type ScheduledTaskStarted ¶
type ScheduledTaskStarted struct { // TODO return resource ID string `json:"id"` }
func (*ScheduledTaskStarted) ResponseBodyMessage ¶
func (s *ScheduledTaskStarted) ResponseBodyMessage() string
func (*ScheduledTaskStarted) ResponseBodyType ¶
func (s *ScheduledTaskStarted) ResponseBodyType() string
type ScheduledTaskStopped ¶
type ScheduledTaskStopped struct { // TODO return resource ID string `json:"id"` }
func (*ScheduledTaskStopped) ResponseBodyMessage ¶
func (s *ScheduledTaskStopped) ResponseBodyMessage() string
func (*ScheduledTaskStopped) ResponseBodyType ¶
func (s *ScheduledTaskStopped) ResponseBodyType() string
type ScheduledTaskWatchingEnded ¶
type ScheduledTaskWatchingEnded struct { }
func (*ScheduledTaskWatchingEnded) ResponseBodyMessage ¶
func (s *ScheduledTaskWatchingEnded) ResponseBodyMessage() string
func (*ScheduledTaskWatchingEnded) ResponseBodyType ¶
func (s *ScheduledTaskWatchingEnded) ResponseBodyType() string
type SetPluginConfigItem ¶
type SetPluginConfigItem PluginConfigItem
func (*SetPluginConfigItem) ResponseBodyMessage ¶
func (t *SetPluginConfigItem) ResponseBodyMessage() string
func (*SetPluginConfigItem) ResponseBodyType ¶
func (t *SetPluginConfigItem) ResponseBodyType() string
type StreamedMetric ¶
type StreamedMetrics ¶
type StreamedMetrics []StreamedMetric
func (StreamedMetrics) Len ¶
func (s StreamedMetrics) Len() int
func (StreamedMetrics) Less ¶
func (s StreamedMetrics) Less(i, j int) bool
func (StreamedMetrics) Swap ¶
func (s StreamedMetrics) Swap(i, j int)
type StreamedTaskEvent ¶
type StreamedTaskEvent struct { // Used to describe the event EventType string `json:"type"` Message string `json:"message"` Event StreamedMetrics `json:"event,omitempty"` }
func (*StreamedTaskEvent) ToJSON ¶
func (s *StreamedTaskEvent) ToJSON() string
type TribeAddAgreement ¶
func (*TribeAddAgreement) ResponseBodyMessage ¶
func (t *TribeAddAgreement) ResponseBodyMessage() string
func (*TribeAddAgreement) ResponseBodyType ¶
func (t *TribeAddAgreement) ResponseBodyType() string
type TribeDeleteAgreement ¶
func (*TribeDeleteAgreement) ResponseBodyMessage ¶
func (t *TribeDeleteAgreement) ResponseBodyMessage() string
func (*TribeDeleteAgreement) ResponseBodyType ¶
func (t *TribeDeleteAgreement) ResponseBodyType() string
type TribeGetAgreement ¶
func (*TribeGetAgreement) ResponseBodyMessage ¶
func (t *TribeGetAgreement) ResponseBodyMessage() string
func (*TribeGetAgreement) ResponseBodyType ¶
func (t *TribeGetAgreement) ResponseBodyType() string
type TribeJoinAgreement ¶
func (*TribeJoinAgreement) ResponseBodyMessage ¶
func (t *TribeJoinAgreement) ResponseBodyMessage() string
func (*TribeJoinAgreement) ResponseBodyType ¶
func (t *TribeJoinAgreement) ResponseBodyType() string
type TribeLeaveAgreement ¶
func (*TribeLeaveAgreement) ResponseBodyMessage ¶
func (t *TribeLeaveAgreement) ResponseBodyMessage() string
func (*TribeLeaveAgreement) ResponseBodyType ¶
func (t *TribeLeaveAgreement) ResponseBodyType() string
type TribeListAgreement ¶
func (*TribeListAgreement) ResponseBodyMessage ¶
func (t *TribeListAgreement) ResponseBodyMessage() string
func (*TribeListAgreement) ResponseBodyType ¶
func (t *TribeListAgreement) ResponseBodyType() string
type TribeMemberList ¶
type TribeMemberList struct {
Members []string `json:"members"`
}
func (*TribeMemberList) ResponseBodyMessage ¶
func (t *TribeMemberList) ResponseBodyMessage() string
func (*TribeMemberList) ResponseBodyType ¶
func (t *TribeMemberList) ResponseBodyType() string
type TribeMemberShow ¶
type TribeMemberShow struct { Name string `json:"name"` PluginAgreement string `json:"plugin_agreement"` Tags map[string]string `json:"tags"` TaskAgreements []string `json:"task_agreements"` }
func (*TribeMemberShow) ResponseBodyMessage ¶
func (t *TribeMemberShow) ResponseBodyMessage() string
func (*TribeMemberShow) ResponseBodyType ¶
func (t *TribeMemberShow) ResponseBodyType() string
Click to show internal directories.
Click to hide internal directories.