jobs

package
v2.0.6+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2020 License: AGPL-3.0 Imports: 23 Imported by: 0

Documentation

Overview

Package jobs is a generated protocol buffer package.

It is generated from these files:

jobs.proto

It has these top-level messages:

NodesSelector
UsersSelector
SourceFilter
Schedule
Action
Job
JobChangeEvent
TaskChangeEvent
PutJobRequest
PutJobResponse
GetJobRequest
GetJobResponse
DeleteJobRequest
DeleteJobResponse
ListJobsRequest
ListJobsResponse
ListTasksRequest
ListTasksResponse
PutTaskRequest
PutTaskResponse
DeleteTasksRequest
DeleteTasksResponse
DetectStuckTasksRequest
DetectStuckTasksResponse
Task
CtrlCommand
CtrlCommandResponse
ActionLog
JobTriggerEvent
ActionOutput
ActionMessage

Package jobs is a generated protocol buffer package.

It is generated from these files:

jobs.proto

It has these top-level messages:

NodesSelector
UsersSelector
SourceFilter
Schedule
Action
Job
JobChangeEvent
TaskChangeEvent
PutJobRequest
PutJobResponse
GetJobRequest
GetJobResponse
DeleteJobRequest
DeleteJobResponse
ListJobsRequest
ListJobsResponse
ListTasksRequest
ListTasksResponse
PutTaskRequest
PutTaskResponse
DeleteTasksRequest
DeleteTasksResponse
DetectStuckTasksRequest
DetectStuckTasksResponse
Task
CtrlCommand
CtrlCommandResponse
ActionLog
JobTriggerEvent
ActionOutput
ActionMessage

Index

Constants

View Source
const (
	IdmEventObjectUser = "USER"
)

Variables

View Source
var Command_name = map[int32]string{
	0: "None",
	1: "Pause",
	2: "Resume",
	3: "Stop",
	4: "Delete",
	5: "RunOnce",
	6: "Inactive",
	7: "Active",
}
View Source
var Command_value = map[string]int32{
	"None":     0,
	"Pause":    1,
	"Resume":   2,
	"Stop":     3,
	"Delete":   4,
	"RunOnce":  5,
	"Inactive": 6,
	"Active":   7,
}
View Source
var TaskStatus_name = map[int32]string{
	0: "Unknown",
	1: "Idle",
	2: "Running",
	3: "Finished",
	4: "Interrupted",
	5: "Paused",
	6: "Any",
	7: "Error",
	8: "Queued",
}
View Source
var TaskStatus_value = map[string]int32{
	"Unknown":     0,
	"Idle":        1,
	"Running":     2,
	"Finished":    3,
	"Interrupted": 4,
	"Paused":      5,
	"Any":         6,
	"Error":       7,
	"Queued":      8,
}

Functions

func IdmChangeEventName

func IdmChangeEventName(objectType string, eventType idm.ChangeEventType) string

IdmChangeEventName builds a string representation for scheduler events for listening to a specific IDM event. For the moment ONLY USER EVENTS are supported

func MatchesIdmChangeEvent

func MatchesIdmChangeEvent(eventName string, event *idm.ChangeEvent) bool

MatchesIdmChangeEvent compares a string representation of scheduler trigger event with an actual idm.ChangeEvent - Only User Events are supported

func NodeChangeEventName

func NodeChangeEventName(event tree.NodeChangeEvent_EventType) string

NodeChangeEventName builds a simple string from a given event type

func ParseNodeChangeEventName

func ParseNodeChangeEventName(eventName string) (tree.NodeChangeEvent_EventType, bool)

ParseNodeChangeEventName parses the passed string and return the corresponding int32 code if it exists or (-1, false) otherwise

func RegisterJobServiceHandler

func RegisterJobServiceHandler(s server.Server, hdlr JobServiceHandler, opts ...server.HandlerOption)

func RegisterTaskServiceHandler

func RegisterTaskServiceHandler(s server.Server, hdlr TaskServiceHandler, opts ...server.HandlerOption)

Types

type Action

type Action struct {
	// String Identifier for specific action
	ID string `protobuf:"bytes,1,opt,name=ID" json:"ID,omitempty"`
	// Nodes Selector
	NodesSelector *NodesSelector `protobuf:"bytes,2,opt,name=NodesSelector" json:"NodesSelector,omitempty"`
	// Users Selector
	UsersSelector *UsersSelector `protobuf:"bytes,3,opt,name=UsersSelector" json:"UsersSelector,omitempty"`
	// Node Filter
	NodesFilter *NodesSelector `protobuf:"bytes,4,opt,name=NodesFilter" json:"NodesFilter,omitempty"`
	// User Filter
	UsersFilter *UsersSelector `protobuf:"bytes,5,opt,name=UsersFilter" json:"UsersFilter,omitempty"`
	// Source filter
	SourceFilter *SourceFilter `protobuf:"bytes,6,opt,name=SourceFilter" json:"SourceFilter,omitempty"`
	// Defined parameters for this action
	Parameters map[string]string `` /* 140-byte string literal not displayed */
	// Other actions to perform after this one is finished,
	// using the Output of this action as Input for the next.
	// If there are many, it is considered they can be triggered
	// in parallel
	ChainedActions []*Action `protobuf:"bytes,8,rep,name=ChainedActions" json:"ChainedActions,omitempty"`
}

func (*Action) ApplyFilters

func (a *Action) ApplyFilters(input ActionMessage) ActionMessage

func (*Action) CollectSelector

func (a *Action) CollectSelector(cl client.Client, ctx context.Context, selector InputSelector, input ActionMessage, output chan ActionMessage, done chan bool)

func (*Action) Descriptor

func (*Action) Descriptor() ([]byte, []int)

func (*Action) FanOutSelector

func (a *Action) FanOutSelector(cl client.Client, ctx context.Context, selector InputSelector, input ActionMessage, output chan ActionMessage, done chan bool)

func (*Action) FanToNext

func (a *Action) FanToNext(cl client.Client, ctx context.Context, index int, input ActionMessage, output chan ActionMessage, done chan bool)

func (*Action) GetChainedActions

func (m *Action) GetChainedActions() []*Action

func (*Action) GetID

func (m *Action) GetID() string

func (*Action) GetNodesFilter

func (m *Action) GetNodesFilter() *NodesSelector

func (*Action) GetNodesSelector

func (m *Action) GetNodesSelector() *NodesSelector

func (*Action) GetParameters

func (m *Action) GetParameters() map[string]string

func (*Action) GetSourceFilter

func (m *Action) GetSourceFilter() *SourceFilter

func (*Action) GetUsersFilter

func (m *Action) GetUsersFilter() *UsersSelector

func (*Action) GetUsersSelector

func (m *Action) GetUsersSelector() *UsersSelector

func (*Action) HasSelectors

func (a *Action) HasSelectors() bool

func (*Action) MarshalLogObject

func (a *Action) MarshalLogObject(encoder zapcore.ObjectEncoder) error

func (*Action) ProtoMessage

func (*Action) ProtoMessage()

func (*Action) Reset

func (m *Action) Reset()

func (*Action) ResolveSelectors

func (a *Action) ResolveSelectors(startMessage ActionMessage, cl client.Client, ctx context.Context, output chan ActionMessage, done chan bool)

func (*Action) String

func (m *Action) String() string

func (*Action) ToMessages

func (a *Action) ToMessages(startMessage ActionMessage, c client.Client, ctx context.Context, output chan ActionMessage, done chan bool)

func (*Action) Validate

func (this *Action) Validate() error

func (*Action) Zap

func (a *Action) Zap() zapcore.Field

Zap simply returns a zapcore.Field object populated with this Action under a standard key

func (*Action) ZapId

func (a *Action) ZapId() zapcore.Field

ZapId simply calls zap.String() with ActionId standard key and this Action id

type ActionLog

type ActionLog struct {
	Action        *Action        `protobuf:"bytes,1,opt,name=Action" json:"Action,omitempty"`
	InputMessage  *ActionMessage `protobuf:"bytes,2,opt,name=InputMessage" json:"InputMessage,omitempty"`
	OutputMessage *ActionMessage `protobuf:"bytes,3,opt,name=OutputMessage" json:"OutputMessage,omitempty"`
}

func (*ActionLog) Descriptor

func (*ActionLog) Descriptor() ([]byte, []int)

func (*ActionLog) GetAction

func (m *ActionLog) GetAction() *Action

func (*ActionLog) GetInputMessage

func (m *ActionLog) GetInputMessage() *ActionMessage

func (*ActionLog) GetOutputMessage

func (m *ActionLog) GetOutputMessage() *ActionMessage

func (*ActionLog) ProtoMessage

func (*ActionLog) ProtoMessage()

func (*ActionLog) Reset

func (m *ActionLog) Reset()

func (*ActionLog) String

func (m *ActionLog) String() string

func (*ActionLog) Validate

func (this *ActionLog) Validate() error

type ActionMessage

type ActionMessage struct {
	Event       *google_protobuf.Any `protobuf:"bytes,1,opt,name=Event" json:"Event,omitempty"`
	Nodes       []*tree.Node         `protobuf:"bytes,2,rep,name=Nodes" json:"Nodes,omitempty"`
	Users       []*idm.User          `protobuf:"bytes,3,rep,name=Users" json:"Users,omitempty"`
	Activities  []*activity.Object   `protobuf:"bytes,4,rep,name=Activities" json:"Activities,omitempty"`
	OutputChain []*ActionOutput      `protobuf:"bytes,5,rep,name=OutputChain" json:"OutputChain,omitempty"`
}

Message passed along from one action to another, main properties are modified by the various actions. OutputChain is being stacked up when passing through actions

func (*ActionMessage) AppendOutput

func (a *ActionMessage) AppendOutput(output *ActionOutput)

func (*ActionMessage) Descriptor

func (*ActionMessage) Descriptor() ([]byte, []int)

func (*ActionMessage) GetActivities

func (m *ActionMessage) GetActivities() []*activity.Object

func (*ActionMessage) GetEvent

func (m *ActionMessage) GetEvent() *google_protobuf.Any

func (*ActionMessage) GetLastOutput

func (a *ActionMessage) GetLastOutput() *ActionOutput

func (*ActionMessage) GetNodes

func (m *ActionMessage) GetNodes() []*tree.Node

func (*ActionMessage) GetOutputChain

func (m *ActionMessage) GetOutputChain() []*ActionOutput

func (*ActionMessage) GetOutputs

func (a *ActionMessage) GetOutputs() []*ActionOutput

func (*ActionMessage) GetUsers

func (m *ActionMessage) GetUsers() []*idm.User

func (*ActionMessage) ProtoMessage

func (*ActionMessage) ProtoMessage()

func (*ActionMessage) Reset

func (m *ActionMessage) Reset()

func (*ActionMessage) String

func (m *ActionMessage) String() string

func (*ActionMessage) Validate

func (this *ActionMessage) Validate() error

func (*ActionMessage) WithError

func (a *ActionMessage) WithError(e error) ActionMessage

func (*ActionMessage) WithIgnore

func (a *ActionMessage) WithIgnore() ActionMessage

func (*ActionMessage) WithNode

func (a *ActionMessage) WithNode(n *tree.Node) ActionMessage

func (*ActionMessage) WithNodes

func (a *ActionMessage) WithNodes(nodes ...*tree.Node) ActionMessage

func (*ActionMessage) WithUser

func (a *ActionMessage) WithUser(u *idm.User) ActionMessage

func (*ActionMessage) WithUsers

func (a *ActionMessage) WithUsers(users ...*idm.User) ActionMessage

type ActionOutput

type ActionOutput struct {
	Success     bool   `protobuf:"varint,1,opt,name=Success" json:"Success,omitempty"`
	RawBody     []byte `protobuf:"bytes,2,opt,name=RawBody,proto3" json:"RawBody,omitempty"`
	StringBody  string `protobuf:"bytes,3,opt,name=StringBody" json:"StringBody,omitempty"`
	JsonBody    []byte `protobuf:"bytes,4,opt,name=JsonBody,proto3" json:"JsonBody,omitempty"`
	ErrorString string `protobuf:"bytes,5,opt,name=ErrorString" json:"ErrorString,omitempty"`
	Ignored     bool   `protobuf:"varint,6,opt,name=Ignored" json:"Ignored,omitempty"`
	Time        int32  `protobuf:"varint,7,opt,name=Time" json:"Time,omitempty"`
}

Standard output of an action. Success value is required other are optional

func (*ActionOutput) Descriptor

func (*ActionOutput) Descriptor() ([]byte, []int)

func (*ActionOutput) GetErrorString

func (m *ActionOutput) GetErrorString() string

func (*ActionOutput) GetIgnored

func (m *ActionOutput) GetIgnored() bool

func (*ActionOutput) GetJsonBody

func (m *ActionOutput) GetJsonBody() []byte

func (*ActionOutput) GetRawBody

func (m *ActionOutput) GetRawBody() []byte

func (*ActionOutput) GetStringBody

func (m *ActionOutput) GetStringBody() string

func (*ActionOutput) GetSuccess

func (m *ActionOutput) GetSuccess() bool

func (*ActionOutput) GetTime

func (m *ActionOutput) GetTime() int32

func (*ActionOutput) ProtoMessage

func (*ActionOutput) ProtoMessage()

func (*ActionOutput) Reset

func (m *ActionOutput) Reset()

func (*ActionOutput) String

func (m *ActionOutput) String() string

func (*ActionOutput) Validate

func (this *ActionOutput) Validate() error

type Command

type Command int32
const (
	Command_None     Command = 0
	Command_Pause    Command = 1
	Command_Resume   Command = 2
	Command_Stop     Command = 3
	Command_Delete   Command = 4
	Command_RunOnce  Command = 5
	Command_Inactive Command = 6
	Command_Active   Command = 7
)

func (Command) EnumDescriptor

func (Command) EnumDescriptor() ([]byte, []int)

func (Command) String

func (x Command) String() string

type CtrlCommand

type CtrlCommand struct {
	// Type of command to send (None, Pause, Resume, Stop, Delete, RunOnce, Inactive, Active)
	Cmd Command `protobuf:"varint,1,opt,name=Cmd,enum=jobs.Command" json:"Cmd,omitempty"`
	// Id of the job
	JobId string `protobuf:"bytes,2,opt,name=JobId" json:"JobId,omitempty"`
	// Id of the associated task
	TaskId string `protobuf:"bytes,3,opt,name=TaskId" json:"TaskId,omitempty"`
	// Owner of the job
	OwnerId string `protobuf:"bytes,4,opt,name=OwnerId" json:"OwnerId,omitempty"`
}

func (*CtrlCommand) Descriptor

func (*CtrlCommand) Descriptor() ([]byte, []int)

func (*CtrlCommand) GetCmd

func (m *CtrlCommand) GetCmd() Command

func (*CtrlCommand) GetJobId

func (m *CtrlCommand) GetJobId() string

func (*CtrlCommand) GetOwnerId

func (m *CtrlCommand) GetOwnerId() string

func (*CtrlCommand) GetTaskId

func (m *CtrlCommand) GetTaskId() string

func (*CtrlCommand) ProtoMessage

func (*CtrlCommand) ProtoMessage()

func (*CtrlCommand) Reset

func (m *CtrlCommand) Reset()

func (*CtrlCommand) String

func (m *CtrlCommand) String() string

func (*CtrlCommand) Validate

func (this *CtrlCommand) Validate() error

type CtrlCommandResponse

type CtrlCommandResponse struct {
	Msg string `protobuf:"bytes,1,opt,name=Msg" json:"Msg,omitempty"`
}

func (*CtrlCommandResponse) Descriptor

func (*CtrlCommandResponse) Descriptor() ([]byte, []int)

func (*CtrlCommandResponse) GetMsg

func (m *CtrlCommandResponse) GetMsg() string

func (*CtrlCommandResponse) ProtoMessage

func (*CtrlCommandResponse) ProtoMessage()

func (*CtrlCommandResponse) Reset

func (m *CtrlCommandResponse) Reset()

func (*CtrlCommandResponse) String

func (m *CtrlCommandResponse) String() string

func (*CtrlCommandResponse) Validate

func (this *CtrlCommandResponse) Validate() error

type DeleteJobRequest

type DeleteJobRequest struct {
	JobID         string `protobuf:"bytes,1,opt,name=JobID" json:"JobID,omitempty"`
	CleanableJobs bool   `protobuf:"varint,2,opt,name=CleanableJobs" json:"CleanableJobs,omitempty"`
}

func (*DeleteJobRequest) Descriptor

func (*DeleteJobRequest) Descriptor() ([]byte, []int)

func (*DeleteJobRequest) GetCleanableJobs

func (m *DeleteJobRequest) GetCleanableJobs() bool

func (*DeleteJobRequest) GetJobID

func (m *DeleteJobRequest) GetJobID() string

func (*DeleteJobRequest) ProtoMessage

func (*DeleteJobRequest) ProtoMessage()

func (*DeleteJobRequest) Reset

func (m *DeleteJobRequest) Reset()

func (*DeleteJobRequest) String

func (m *DeleteJobRequest) String() string

func (*DeleteJobRequest) Validate

func (this *DeleteJobRequest) Validate() error

type DeleteJobResponse

type DeleteJobResponse struct {
	Success     bool  `protobuf:"varint,1,opt,name=Success" json:"Success,omitempty"`
	DeleteCount int32 `protobuf:"varint,2,opt,name=DeleteCount" json:"DeleteCount,omitempty"`
}

func (*DeleteJobResponse) Descriptor

func (*DeleteJobResponse) Descriptor() ([]byte, []int)

func (*DeleteJobResponse) GetDeleteCount

func (m *DeleteJobResponse) GetDeleteCount() int32

func (*DeleteJobResponse) GetSuccess

func (m *DeleteJobResponse) GetSuccess() bool

func (*DeleteJobResponse) ProtoMessage

func (*DeleteJobResponse) ProtoMessage()

func (*DeleteJobResponse) Reset

func (m *DeleteJobResponse) Reset()

func (*DeleteJobResponse) String

func (m *DeleteJobResponse) String() string

func (*DeleteJobResponse) Validate

func (this *DeleteJobResponse) Validate() error

type DeleteTasksRequest

type DeleteTasksRequest struct {
	// Id of the job
	JobId string `protobuf:"bytes,1,opt,name=JobId" json:"JobId,omitempty"`
	// Ids of tasks to delete
	TaskID []string `protobuf:"bytes,2,rep,name=TaskID" json:"TaskID,omitempty"`
	// If no TaskID and/or no JobID are passed, delete tasks by status
	Status []TaskStatus `protobuf:"varint,3,rep,packed,name=Status,enum=jobs.TaskStatus" json:"Status,omitempty"`
	// If deleting by status, optionally keep only a number of tasks
	PruneLimit int32 `protobuf:"varint,4,opt,name=PruneLimit" json:"PruneLimit,omitempty"`
}

func (*DeleteTasksRequest) Descriptor

func (*DeleteTasksRequest) Descriptor() ([]byte, []int)

func (*DeleteTasksRequest) GetJobId

func (m *DeleteTasksRequest) GetJobId() string

func (*DeleteTasksRequest) GetPruneLimit

func (m *DeleteTasksRequest) GetPruneLimit() int32

func (*DeleteTasksRequest) GetStatus

func (m *DeleteTasksRequest) GetStatus() []TaskStatus

func (*DeleteTasksRequest) GetTaskID

func (m *DeleteTasksRequest) GetTaskID() []string

func (*DeleteTasksRequest) ProtoMessage

func (*DeleteTasksRequest) ProtoMessage()

func (*DeleteTasksRequest) Reset

func (m *DeleteTasksRequest) Reset()

func (*DeleteTasksRequest) String

func (m *DeleteTasksRequest) String() string

func (*DeleteTasksRequest) Validate

func (this *DeleteTasksRequest) Validate() error

type DeleteTasksResponse

type DeleteTasksResponse struct {
	Deleted []string `protobuf:"bytes,1,rep,name=Deleted" json:"Deleted,omitempty"`
}

func (*DeleteTasksResponse) Descriptor

func (*DeleteTasksResponse) Descriptor() ([]byte, []int)

func (*DeleteTasksResponse) GetDeleted

func (m *DeleteTasksResponse) GetDeleted() []string

func (*DeleteTasksResponse) ProtoMessage

func (*DeleteTasksResponse) ProtoMessage()

func (*DeleteTasksResponse) Reset

func (m *DeleteTasksResponse) Reset()

func (*DeleteTasksResponse) String

func (m *DeleteTasksResponse) String() string

func (*DeleteTasksResponse) Validate

func (this *DeleteTasksResponse) Validate() error

type DetectStuckTasksRequest

type DetectStuckTasksRequest struct {
	Since int32 `protobuf:"varint,1,opt,name=Since" json:"Since,omitempty"`
}

func (*DetectStuckTasksRequest) Descriptor

func (*DetectStuckTasksRequest) Descriptor() ([]byte, []int)

func (*DetectStuckTasksRequest) GetSince

func (m *DetectStuckTasksRequest) GetSince() int32

func (*DetectStuckTasksRequest) ProtoMessage

func (*DetectStuckTasksRequest) ProtoMessage()

func (*DetectStuckTasksRequest) Reset

func (m *DetectStuckTasksRequest) Reset()

func (*DetectStuckTasksRequest) String

func (m *DetectStuckTasksRequest) String() string

func (*DetectStuckTasksRequest) Validate

func (this *DetectStuckTasksRequest) Validate() error

type DetectStuckTasksResponse

type DetectStuckTasksResponse struct {
	FixedTaskIds []string `protobuf:"bytes,1,rep,name=FixedTaskIds" json:"FixedTaskIds,omitempty"`
}

func (*DetectStuckTasksResponse) Descriptor

func (*DetectStuckTasksResponse) Descriptor() ([]byte, []int)

func (*DetectStuckTasksResponse) GetFixedTaskIds

func (m *DetectStuckTasksResponse) GetFixedTaskIds() []string

func (*DetectStuckTasksResponse) ProtoMessage

func (*DetectStuckTasksResponse) ProtoMessage()

func (*DetectStuckTasksResponse) Reset

func (m *DetectStuckTasksResponse) Reset()

func (*DetectStuckTasksResponse) String

func (m *DetectStuckTasksResponse) String() string

func (*DetectStuckTasksResponse) Validate

func (this *DetectStuckTasksResponse) Validate() error

type GetJobRequest

type GetJobRequest struct {
	JobID     string     `protobuf:"bytes,1,opt,name=JobID" json:"JobID,omitempty"`
	LoadTasks TaskStatus `protobuf:"varint,2,opt,name=LoadTasks,enum=jobs.TaskStatus" json:"LoadTasks,omitempty"`
}

func (*GetJobRequest) Descriptor

func (*GetJobRequest) Descriptor() ([]byte, []int)

func (*GetJobRequest) GetJobID

func (m *GetJobRequest) GetJobID() string

func (*GetJobRequest) GetLoadTasks

func (m *GetJobRequest) GetLoadTasks() TaskStatus

func (*GetJobRequest) ProtoMessage

func (*GetJobRequest) ProtoMessage()

func (*GetJobRequest) Reset

func (m *GetJobRequest) Reset()

func (*GetJobRequest) String

func (m *GetJobRequest) String() string

func (*GetJobRequest) Validate

func (this *GetJobRequest) Validate() error

type GetJobResponse

type GetJobResponse struct {
	Job *Job `protobuf:"bytes,1,opt,name=Job" json:"Job,omitempty"`
}

func (*GetJobResponse) Descriptor

func (*GetJobResponse) Descriptor() ([]byte, []int)

func (*GetJobResponse) GetJob

func (m *GetJobResponse) GetJob() *Job

func (*GetJobResponse) ProtoMessage

func (*GetJobResponse) ProtoMessage()

func (*GetJobResponse) Reset

func (m *GetJobResponse) Reset()

func (*GetJobResponse) String

func (m *GetJobResponse) String() string

func (*GetJobResponse) Validate

func (this *GetJobResponse) Validate() error

type InputFilter

type InputFilter interface {
	Filter(input ActionMessage) ActionMessage
}

type InputSelector

type InputSelector interface {
	Select(cl client.Client, ctx context.Context, objects chan interface{}, done chan bool) error
	MultipleSelection() bool
}

type Job

type Job struct {
	// Unique ID for this Job
	ID string `protobuf:"bytes,1,opt,name=ID" json:"ID,omitempty"`
	// Human-readable Label
	Label string `protobuf:"bytes,2,opt,name=Label" json:"Label,omitempty"`
	// Who created this Job
	Owner string `protobuf:"bytes,3,opt,name=Owner" json:"Owner,omitempty"`
	// Admin can temporarily disable this job
	Inactive bool `protobuf:"varint,4,opt,name=Inactive" json:"Inactive,omitempty"`
	// Optional list of languages detected in the context at launch time
	Languages []string `protobuf:"bytes,10,rep,name=Languages" json:"Languages,omitempty"`
	// How the job will be triggered.
	// One of these must be set (not exclusive)
	// Listen to a given set of events
	EventNames []string `protobuf:"bytes,5,rep,name=EventNames" json:"EventNames,omitempty"`
	// Schedule a periodic repetition
	Schedule *Schedule `protobuf:"bytes,6,opt,name=Schedule" json:"Schedule,omitempty"`
	// Start task as soon as job is inserted
	AutoStart bool `protobuf:"varint,7,opt,name=AutoStart" json:"AutoStart,omitempty"`
	// Remove job automatically once it is finished (success only)
	AutoClean bool `protobuf:"varint,11,opt,name=AutoClean" json:"AutoClean,omitempty"`
	// Chain of actions to perform
	Actions []*Action `protobuf:"bytes,8,rep,name=Actions" json:"Actions,omitempty"`
	// Task properties
	MaxConcurrency int32 `protobuf:"varint,9,opt,name=MaxConcurrency" json:"MaxConcurrency,omitempty"`
	// Do not send notification on task update
	TasksSilentUpdate bool `protobuf:"varint,12,opt,name=TasksSilentUpdate" json:"TasksSilentUpdate,omitempty"`
	// Filled with currently running tasks
	Tasks           []*Task        `protobuf:"bytes,14,rep,name=Tasks" json:"Tasks,omitempty"`
	NodeEventFilter *NodesSelector `protobuf:"bytes,15,opt,name=NodeEventFilter" json:"NodeEventFilter,omitempty"`
	UserEventFilter *UsersSelector `protobuf:"bytes,16,opt,name=UserEventFilter" json:"UserEventFilter,omitempty"`
}

func (*Job) Descriptor

func (*Job) Descriptor() ([]byte, []int)

func (*Job) GetActions

func (m *Job) GetActions() []*Action

func (*Job) GetAutoClean

func (m *Job) GetAutoClean() bool

func (*Job) GetAutoStart

func (m *Job) GetAutoStart() bool

func (*Job) GetEventNames

func (m *Job) GetEventNames() []string

func (*Job) GetID

func (m *Job) GetID() string

func (*Job) GetInactive

func (m *Job) GetInactive() bool

func (*Job) GetLabel

func (m *Job) GetLabel() string

func (*Job) GetLanguages

func (m *Job) GetLanguages() []string

func (*Job) GetMaxConcurrency

func (m *Job) GetMaxConcurrency() int32

func (*Job) GetNodeEventFilter

func (m *Job) GetNodeEventFilter() *NodesSelector

func (*Job) GetOwner

func (m *Job) GetOwner() string

func (*Job) GetSchedule

func (m *Job) GetSchedule() *Schedule

func (*Job) GetTasks

func (m *Job) GetTasks() []*Task

func (*Job) GetTasksSilentUpdate

func (m *Job) GetTasksSilentUpdate() bool

func (*Job) GetUserEventFilter

func (m *Job) GetUserEventFilter() *UsersSelector

func (*Job) MarshalLogObject

func (job *Job) MarshalLogObject(encoder zapcore.ObjectEncoder) error

func (*Job) ProtoMessage

func (*Job) ProtoMessage()

func (*Job) Reset

func (m *Job) Reset()

func (*Job) String

func (m *Job) String() string

func (*Job) Validate

func (this *Job) Validate() error

func (*Job) Zap

func (job *Job) Zap() zapcore.Field

Zap simply returns a zapcore.Field object populated with this Job under a standard key

func (*Job) ZapId

func (job *Job) ZapId() zapcore.Field

ZapId simply calls zap.String() with JobId standard key and this Job Id

type JobChangeEvent

type JobChangeEvent struct {
	JobUpdated *Job   `protobuf:"bytes,1,opt,name=JobUpdated" json:"JobUpdated,omitempty"`
	JobRemoved string `protobuf:"bytes,2,opt,name=JobRemoved" json:"JobRemoved,omitempty"`
}

Events sent by the JobService when CRUD'ing a Job configuration

func (*JobChangeEvent) Descriptor

func (*JobChangeEvent) Descriptor() ([]byte, []int)

func (*JobChangeEvent) GetJobRemoved

func (m *JobChangeEvent) GetJobRemoved() string

func (*JobChangeEvent) GetJobUpdated

func (m *JobChangeEvent) GetJobUpdated() *Job

func (*JobChangeEvent) ProtoMessage

func (*JobChangeEvent) ProtoMessage()

func (*JobChangeEvent) Reset

func (m *JobChangeEvent) Reset()

func (*JobChangeEvent) String

func (m *JobChangeEvent) String() string

func (*JobChangeEvent) Validate

func (this *JobChangeEvent) Validate() error

type JobService

type JobService struct {
	JobServiceHandler
}

func (*JobService) DeleteJob

func (h *JobService) DeleteJob(ctx context.Context, in *DeleteJobRequest, out *DeleteJobResponse) error

func (*JobService) DeleteTasks

func (h *JobService) DeleteTasks(ctx context.Context, in *DeleteTasksRequest, out *DeleteTasksResponse) error

func (*JobService) DetectStuckTasks

func (*JobService) GetJob

func (h *JobService) GetJob(ctx context.Context, in *GetJobRequest, out *GetJobResponse) error

func (*JobService) ListJobs

func (h *JobService) ListJobs(ctx context.Context, stream server.Streamer) error

func (*JobService) ListTasks

func (h *JobService) ListTasks(ctx context.Context, stream server.Streamer) error

func (*JobService) PutJob

func (h *JobService) PutJob(ctx context.Context, in *PutJobRequest, out *PutJobResponse) error

func (*JobService) PutTask

func (h *JobService) PutTask(ctx context.Context, in *PutTaskRequest, out *PutTaskResponse) error

func (*JobService) PutTaskStream

func (h *JobService) PutTaskStream(ctx context.Context, stream server.Streamer) error

type JobService_ListJobsClient

type JobService_ListJobsClient interface {
	SendMsg(interface{}) error
	RecvMsg(interface{}) error
	Close() error
	Recv() (*ListJobsResponse, error)
}

type JobService_ListJobsStream

type JobService_ListJobsStream interface {
	SendMsg(interface{}) error
	RecvMsg(interface{}) error
	Close() error
	Send(*ListJobsResponse) error
}

type JobService_ListTasksClient

type JobService_ListTasksClient interface {
	SendMsg(interface{}) error
	RecvMsg(interface{}) error
	Close() error
	Recv() (*ListTasksResponse, error)
}

type JobService_ListTasksStream

type JobService_ListTasksStream interface {
	SendMsg(interface{}) error
	RecvMsg(interface{}) error
	Close() error
	Send(*ListTasksResponse) error
}

type JobService_PutTaskStreamClient

type JobService_PutTaskStreamClient interface {
	SendMsg(interface{}) error
	RecvMsg(interface{}) error
	Close() error
	Send(*PutTaskRequest) error
	Recv() (*PutTaskResponse, error)
}

type JobService_PutTaskStreamStream

type JobService_PutTaskStreamStream interface {
	SendMsg(interface{}) error
	RecvMsg(interface{}) error
	Close() error
	Send(*PutTaskResponse) error
	Recv() (*PutTaskRequest, error)
}

type JobTriggerEvent

type JobTriggerEvent struct {
	JobID    string    `protobuf:"bytes,1,opt,name=JobID" json:"JobID,omitempty"`
	Schedule *Schedule `protobuf:"bytes,2,opt,name=Schedule" json:"Schedule,omitempty"`
	RunNow   bool      `protobuf:"varint,3,opt,name=RunNow" json:"RunNow,omitempty"`
}

Simple Event sent by the Timer Service to trigger a JobID at a given time

func (*JobTriggerEvent) Descriptor

func (*JobTriggerEvent) Descriptor() ([]byte, []int)

func (*JobTriggerEvent) GetJobID

func (m *JobTriggerEvent) GetJobID() string

func (*JobTriggerEvent) GetRunNow

func (m *JobTriggerEvent) GetRunNow() bool

func (*JobTriggerEvent) GetSchedule

func (m *JobTriggerEvent) GetSchedule() *Schedule

func (*JobTriggerEvent) ProtoMessage

func (*JobTriggerEvent) ProtoMessage()

func (*JobTriggerEvent) Reset

func (m *JobTriggerEvent) Reset()

func (*JobTriggerEvent) String

func (m *JobTriggerEvent) String() string

func (*JobTriggerEvent) Validate

func (this *JobTriggerEvent) Validate() error

type ListJobsRequest

type ListJobsRequest struct {
	// Restrict to a specific owner (current user by default)
	Owner string `protobuf:"bytes,1,opt,name=Owner" json:"Owner,omitempty"`
	// Filter with only event-based jobs
	EventsOnly bool `protobuf:"varint,2,opt,name=EventsOnly" json:"EventsOnly,omitempty"`
	// Filter with only timer-based jobs
	TimersOnly bool `protobuf:"varint,3,opt,name=TimersOnly" json:"TimersOnly,omitempty"`
	// Load tasks that correspond to the given TaskStatus
	LoadTasks TaskStatus `protobuf:"varint,4,opt,name=LoadTasks,enum=jobs.TaskStatus" json:"LoadTasks,omitempty"`
	// Load jobs by their ID
	JobIDs []string `protobuf:"bytes,5,rep,name=JobIDs" json:"JobIDs,omitempty"`
	// Start listing at a given position
	TasksOffset int32 `protobuf:"varint,6,opt,name=TasksOffset" json:"TasksOffset,omitempty"`
	// Lmit the number of results
	TasksLimit int32 `protobuf:"varint,7,opt,name=TasksLimit" json:"TasksLimit,omitempty"`
}

func (*ListJobsRequest) Descriptor

func (*ListJobsRequest) Descriptor() ([]byte, []int)

func (*ListJobsRequest) GetEventsOnly

func (m *ListJobsRequest) GetEventsOnly() bool

func (*ListJobsRequest) GetJobIDs

func (m *ListJobsRequest) GetJobIDs() []string

func (*ListJobsRequest) GetLoadTasks

func (m *ListJobsRequest) GetLoadTasks() TaskStatus

func (*ListJobsRequest) GetOwner

func (m *ListJobsRequest) GetOwner() string

func (*ListJobsRequest) GetTasksLimit

func (m *ListJobsRequest) GetTasksLimit() int32

func (*ListJobsRequest) GetTasksOffset

func (m *ListJobsRequest) GetTasksOffset() int32

func (*ListJobsRequest) GetTimersOnly

func (m *ListJobsRequest) GetTimersOnly() bool

func (*ListJobsRequest) ProtoMessage

func (*ListJobsRequest) ProtoMessage()

func (*ListJobsRequest) Reset

func (m *ListJobsRequest) Reset()

func (*ListJobsRequest) String

func (m *ListJobsRequest) String() string

func (*ListJobsRequest) Validate

func (this *ListJobsRequest) Validate() error

type ListJobsResponse

type ListJobsResponse struct {
	Job *Job `protobuf:"bytes,1,opt,name=Job" json:"Job,omitempty"`
}

func (*ListJobsResponse) Descriptor

func (*ListJobsResponse) Descriptor() ([]byte, []int)

func (*ListJobsResponse) GetJob

func (m *ListJobsResponse) GetJob() *Job

func (*ListJobsResponse) ProtoMessage

func (*ListJobsResponse) ProtoMessage()

func (*ListJobsResponse) Reset

func (m *ListJobsResponse) Reset()

func (*ListJobsResponse) String

func (m *ListJobsResponse) String() string

func (*ListJobsResponse) Validate

func (this *ListJobsResponse) Validate() error

type ListTasksRequest

type ListTasksRequest struct {
	// List tasks for the job with this Id
	JobID string `protobuf:"bytes,1,opt,name=JobID" json:"JobID,omitempty"`
	// List only tasks with this Status
	Status TaskStatus `protobuf:"varint,2,opt,name=Status,enum=jobs.TaskStatus" json:"Status,omitempty"`
}

func (*ListTasksRequest) Descriptor

func (*ListTasksRequest) Descriptor() ([]byte, []int)

func (*ListTasksRequest) GetJobID

func (m *ListTasksRequest) GetJobID() string

func (*ListTasksRequest) GetStatus

func (m *ListTasksRequest) GetStatus() TaskStatus

func (*ListTasksRequest) ProtoMessage

func (*ListTasksRequest) ProtoMessage()

func (*ListTasksRequest) Reset

func (m *ListTasksRequest) Reset()

func (*ListTasksRequest) String

func (m *ListTasksRequest) String() string

func (*ListTasksRequest) Validate

func (this *ListTasksRequest) Validate() error

type ListTasksResponse

type ListTasksResponse struct {
	Task *Task `protobuf:"bytes,1,opt,name=Task" json:"Task,omitempty"`
}

func (*ListTasksResponse) Descriptor

func (*ListTasksResponse) Descriptor() ([]byte, []int)

func (*ListTasksResponse) GetTask

func (m *ListTasksResponse) GetTask() *Task

func (*ListTasksResponse) ProtoMessage

func (*ListTasksResponse) ProtoMessage()

func (*ListTasksResponse) Reset

func (m *ListTasksResponse) Reset()

func (*ListTasksResponse) String

func (m *ListTasksResponse) String() string

func (*ListTasksResponse) Validate

func (this *ListTasksResponse) Validate() error

type NodesSelector

type NodesSelector struct {
	// Select all files - ignore any other condition
	All bool `protobuf:"varint,1,opt,name=All" json:"All,omitempty"`
	// Preset list of node pathes
	Pathes []string `protobuf:"bytes,2,rep,name=Pathes" json:"Pathes,omitempty"`
	// Preset set of nodes
	Nodes []*tree.Node `protobuf:"bytes,3,rep,name=Nodes" json:"Nodes,omitempty"`
	// Query to apply to select users (or filter a given node passed by event)
	Query *service.Query `protobuf:"bytes,4,opt,name=Query" json:"Query,omitempty"`
	// Wether to trigger one action per node or one action
	// with all nodes as selection
	Collect bool `protobuf:"varint,5,opt,name=Collect" json:"Collect,omitempty"`
}

///////////////// JOB SERVICE // /////////////////

func (*NodesSelector) Descriptor

func (*NodesSelector) Descriptor() ([]byte, []int)

func (*NodesSelector) Filter

func (n *NodesSelector) Filter(input ActionMessage) ActionMessage

func (*NodesSelector) GetAll

func (m *NodesSelector) GetAll() bool

func (*NodesSelector) GetCollect

func (m *NodesSelector) GetCollect() bool

func (*NodesSelector) GetNodes

func (m *NodesSelector) GetNodes() []*tree.Node

func (*NodesSelector) GetPathes

func (m *NodesSelector) GetPathes() []string

func (*NodesSelector) GetQuery

func (m *NodesSelector) GetQuery() *service.Query

func (*NodesSelector) MultipleSelection

func (n *NodesSelector) MultipleSelection() bool

func (*NodesSelector) ProtoMessage

func (*NodesSelector) ProtoMessage()

func (*NodesSelector) Reset

func (m *NodesSelector) Reset()

func (*NodesSelector) Select

func (n *NodesSelector) Select(cl client.Client, ctx context.Context, objects chan interface{}, done chan bool) error

func (*NodesSelector) String

func (m *NodesSelector) String() string

func (*NodesSelector) Validate

func (this *NodesSelector) Validate() error

type PutJobRequest

type PutJobRequest struct {
	Job *Job `protobuf:"bytes,1,opt,name=Job" json:"Job,omitempty"`
}

func (*PutJobRequest) Descriptor

func (*PutJobRequest) Descriptor() ([]byte, []int)

func (*PutJobRequest) GetJob

func (m *PutJobRequest) GetJob() *Job

func (*PutJobRequest) ProtoMessage

func (*PutJobRequest) ProtoMessage()

func (*PutJobRequest) Reset

func (m *PutJobRequest) Reset()

func (*PutJobRequest) String

func (m *PutJobRequest) String() string

func (*PutJobRequest) Validate

func (this *PutJobRequest) Validate() error

type PutJobResponse

type PutJobResponse struct {
	Job *Job `protobuf:"bytes,1,opt,name=Job" json:"Job,omitempty"`
}

func (*PutJobResponse) Descriptor

func (*PutJobResponse) Descriptor() ([]byte, []int)

func (*PutJobResponse) GetJob

func (m *PutJobResponse) GetJob() *Job

func (*PutJobResponse) ProtoMessage

func (*PutJobResponse) ProtoMessage()

func (*PutJobResponse) Reset

func (m *PutJobResponse) Reset()

func (*PutJobResponse) String

func (m *PutJobResponse) String() string

func (*PutJobResponse) Validate

func (this *PutJobResponse) Validate() error

type PutTaskRequest

type PutTaskRequest struct {
	Task *Task `protobuf:"bytes,1,opt,name=Task" json:"Task,omitempty"`
}

func (*PutTaskRequest) Descriptor

func (*PutTaskRequest) Descriptor() ([]byte, []int)

func (*PutTaskRequest) GetTask

func (m *PutTaskRequest) GetTask() *Task

func (*PutTaskRequest) ProtoMessage

func (*PutTaskRequest) ProtoMessage()

func (*PutTaskRequest) Reset

func (m *PutTaskRequest) Reset()

func (*PutTaskRequest) String

func (m *PutTaskRequest) String() string

func (*PutTaskRequest) Validate

func (this *PutTaskRequest) Validate() error

type PutTaskResponse

type PutTaskResponse struct {
	Task *Task `protobuf:"bytes,1,opt,name=Task" json:"Task,omitempty"`
}

func (*PutTaskResponse) Descriptor

func (*PutTaskResponse) Descriptor() ([]byte, []int)

func (*PutTaskResponse) GetTask

func (m *PutTaskResponse) GetTask() *Task

func (*PutTaskResponse) ProtoMessage

func (*PutTaskResponse) ProtoMessage()

func (*PutTaskResponse) Reset

func (m *PutTaskResponse) Reset()

func (*PutTaskResponse) String

func (m *PutTaskResponse) String() string

func (*PutTaskResponse) Validate

func (this *PutTaskResponse) Validate() error

type Schedule

type Schedule struct {
	// ISO 8601 Description of the scheduling for instance "R2/2015-06-04T19:25:16.828696-07:00/PT4S"
	// where first part is the number of repetitions (if 0, infinite repetition),
	// second part the starting date and last part, the duration between 2 occurrences.
	Iso8601Schedule string `protobuf:"bytes,1,opt,name=Iso8601Schedule" json:"Iso8601Schedule,omitempty"`
	// Minimum time between two runs
	Iso8601MinDelta string `protobuf:"bytes,3,opt,name=Iso8601MinDelta" json:"Iso8601MinDelta,omitempty"`
}

func (*Schedule) Descriptor

func (*Schedule) Descriptor() ([]byte, []int)

func (*Schedule) GetIso8601MinDelta

func (m *Schedule) GetIso8601MinDelta() string

func (*Schedule) GetIso8601Schedule

func (m *Schedule) GetIso8601Schedule() string

func (*Schedule) ProtoMessage

func (*Schedule) ProtoMessage()

func (*Schedule) Reset

func (m *Schedule) Reset()

func (*Schedule) String

func (m *Schedule) String() string

func (*Schedule) Validate

func (this *Schedule) Validate() error

type SourceFilter

type SourceFilter struct {
	// Can be built with SourceSingleQuery or ActionOutputQuery
	Query *service.Query `protobuf:"bytes,1,opt,name=Query" json:"Query,omitempty"`
}

func (*SourceFilter) Descriptor

func (*SourceFilter) Descriptor() ([]byte, []int)

func (*SourceFilter) Filter

func (n *SourceFilter) Filter(input ActionMessage) ActionMessage

func (*SourceFilter) GetQuery

func (m *SourceFilter) GetQuery() *service.Query

func (*SourceFilter) ProtoMessage

func (*SourceFilter) ProtoMessage()

func (*SourceFilter) Reset

func (m *SourceFilter) Reset()

func (*SourceFilter) String

func (m *SourceFilter) String() string

func (*SourceFilter) Validate

func (this *SourceFilter) Validate() error

type Task

type Task struct {
	ID            string     `protobuf:"bytes,1,opt,name=ID" json:"ID,omitempty"`
	JobID         string     `protobuf:"bytes,2,opt,name=JobID" json:"JobID,omitempty"`
	Status        TaskStatus `protobuf:"varint,3,opt,name=Status,enum=jobs.TaskStatus" json:"Status,omitempty"`
	StatusMessage string     `protobuf:"bytes,4,opt,name=StatusMessage" json:"StatusMessage,omitempty"`
	TriggerOwner  string     `protobuf:"bytes,5,opt,name=TriggerOwner" json:"TriggerOwner,omitempty"`
	StartTime     int32      `protobuf:"varint,6,opt,name=StartTime" json:"StartTime,omitempty"`
	EndTime       int32      `protobuf:"varint,7,opt,name=EndTime" json:"EndTime,omitempty"`
	// Can be interrupted
	CanStop bool `protobuf:"varint,8,opt,name=CanStop" json:"CanStop,omitempty"`
	// Can be paused/resumed
	CanPause bool `protobuf:"varint,9,opt,name=CanPause" json:"CanPause,omitempty"`
	// Tasks publish a progress
	HasProgress bool `protobuf:"varint,10,opt,name=HasProgress" json:"HasProgress,omitempty"`
	// Float value of the progress between 0 and 1
	Progress float32 `protobuf:"fixed32,11,opt,name=Progress" json:"Progress,omitempty"`
	// Logs of all the actions performed
	ActionsLogs []*ActionLog `protobuf:"bytes,12,rep,name=ActionsLogs" json:"ActionsLogs,omitempty"`
}

func (*Task) Descriptor

func (*Task) Descriptor() ([]byte, []int)

func (*Task) GetActionsLogs

func (m *Task) GetActionsLogs() []*ActionLog

func (*Task) GetCanPause

func (m *Task) GetCanPause() bool

func (*Task) GetCanStop

func (m *Task) GetCanStop() bool

func (*Task) GetCtxOperationID

func (task *Task) GetCtxOperationID() string

func (*Task) GetEndTime

func (m *Task) GetEndTime() int32

func (*Task) GetHasProgress

func (m *Task) GetHasProgress() bool

func (*Task) GetID

func (m *Task) GetID() string

func (*Task) GetJobID

func (m *Task) GetJobID() string

func (*Task) GetProgress

func (m *Task) GetProgress() float32

func (*Task) GetStartTime

func (m *Task) GetStartTime() int32

func (*Task) GetStatus

func (m *Task) GetStatus() TaskStatus

func (*Task) GetStatusMessage

func (m *Task) GetStatusMessage() string

func (*Task) GetTriggerOwner

func (m *Task) GetTriggerOwner() string

func (*Task) MarshalLogObject

func (task *Task) MarshalLogObject(encoder zapcore.ObjectEncoder) error

func (*Task) ProtoMessage

func (*Task) ProtoMessage()

func (*Task) Reset

func (m *Task) Reset()

func (*Task) String

func (m *Task) String() string

func (*Task) Validate

func (this *Task) Validate() error

func (*Task) WithoutLogs

func (task *Task) WithoutLogs() *Task

func (*Task) Zap

func (task *Task) Zap() zapcore.Field

Zap simply returns a zapcore.Field object populated with this Task under a standard key

func (*Task) ZapId

func (task *Task) ZapId() zapcore.Field

ZapId simply calls zap.String() with TaskId standard key and this Task Id

type TaskChangeEvent

type TaskChangeEvent struct {
	TaskUpdated *Task `protobuf:"bytes,1,opt,name=TaskUpdated" json:"TaskUpdated,omitempty"`
	Job         *Job  `protobuf:"bytes,2,opt,name=Job" json:"Job,omitempty"`
}

func (*TaskChangeEvent) Descriptor

func (*TaskChangeEvent) Descriptor() ([]byte, []int)

func (*TaskChangeEvent) GetJob

func (m *TaskChangeEvent) GetJob() *Job

func (*TaskChangeEvent) GetTaskUpdated

func (m *TaskChangeEvent) GetTaskUpdated() *Task

func (*TaskChangeEvent) ProtoMessage

func (*TaskChangeEvent) ProtoMessage()

func (*TaskChangeEvent) Reset

func (m *TaskChangeEvent) Reset()

func (*TaskChangeEvent) String

func (m *TaskChangeEvent) String() string

func (*TaskChangeEvent) Validate

func (this *TaskChangeEvent) Validate() error

type TaskService

type TaskService struct {
	TaskServiceHandler
}

func (*TaskService) Control

func (h *TaskService) Control(ctx context.Context, in *CtrlCommand, out *CtrlCommandResponse) error

type TaskServiceClient

type TaskServiceClient interface {
	Control(ctx context.Context, in *CtrlCommand, opts ...client.CallOption) (*CtrlCommandResponse, error)
}

func NewTaskServiceClient

func NewTaskServiceClient(serviceName string, c client.Client) TaskServiceClient

type TaskServiceHandler

type TaskServiceHandler interface {
	Control(context.Context, *CtrlCommand, *CtrlCommandResponse) error
}

type TaskStatus

type TaskStatus int32

///////////////// TASK SERVICE // /////////////////

const (
	TaskStatus_Unknown     TaskStatus = 0
	TaskStatus_Idle        TaskStatus = 1
	TaskStatus_Running     TaskStatus = 2
	TaskStatus_Finished    TaskStatus = 3
	TaskStatus_Interrupted TaskStatus = 4
	TaskStatus_Paused      TaskStatus = 5
	TaskStatus_Any         TaskStatus = 6
	TaskStatus_Error       TaskStatus = 7
	TaskStatus_Queued      TaskStatus = 8
)

func (TaskStatus) EnumDescriptor

func (TaskStatus) EnumDescriptor() ([]byte, []int)

func (TaskStatus) String

func (x TaskStatus) String() string

type UsersSelector

type UsersSelector struct {
	// Select all users
	All bool `protobuf:"varint,1,opt,name=All" json:"All,omitempty"`
	// Preset set of Users
	Users []*idm.User `protobuf:"bytes,2,rep,name=Users" json:"Users,omitempty"`
	// Filter users using this query
	Query *service.Query `protobuf:"bytes,3,opt,name=Query" json:"Query,omitempty"`
	// Wether to trigger one action per user or one action
	// with all user as a selection
	Collect bool `protobuf:"varint,5,opt,name=Collect" json:"Collect,omitempty"`
}

func (*UsersSelector) Descriptor

func (*UsersSelector) Descriptor() ([]byte, []int)

func (*UsersSelector) Filter

func (n *UsersSelector) Filter(input ActionMessage) ActionMessage

func (*UsersSelector) GetAll

func (m *UsersSelector) GetAll() bool

func (*UsersSelector) GetCollect

func (m *UsersSelector) GetCollect() bool

func (*UsersSelector) GetQuery

func (m *UsersSelector) GetQuery() *service.Query

func (*UsersSelector) GetUsers

func (m *UsersSelector) GetUsers() []*idm.User

func (*UsersSelector) MultipleSelection

func (u *UsersSelector) MultipleSelection() bool

func (*UsersSelector) ProtoMessage

func (*UsersSelector) ProtoMessage()

func (*UsersSelector) Reset

func (m *UsersSelector) Reset()

func (*UsersSelector) Select

func (u *UsersSelector) Select(client client.Client, ctx context.Context, objects chan interface{}, done chan bool) error

ENRICH UsersSelector METHODS

func (*UsersSelector) String

func (m *UsersSelector) String() string

func (*UsersSelector) Validate

func (this *UsersSelector) Validate() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL