jobs

package
v2.1.0-rc0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2020 License: AGPL-3.0 Imports: 35 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
IdmSelector
UsersSelector
ActionOutputFilter
ContextMetaFilter
ContextMetaSingleQuery
Schedule
Action
Job
JobParameter
JobChangeEvent
TaskChangeEvent
PutJobRequest
PutJobResponse
GetJobRequest
GetJobResponse
DeleteJobRequest
DeleteJobResponse
ListJobsRequest
ListJobsResponse
ListTasksRequest
ListTasksResponse
PutTaskRequest
PutTaskResponse
DeleteTasksRequest
DeleteTasksResponse
DetectStuckTasksRequest
DetectStuckTasksResponse
Task
CtrlCommand
CtrlCommandResponse
ActionLog
JobTriggerEvent
ActionOutput
ActionOutputSingleQuery
ActionMessage

Package jobs is a generated protocol buffer package.

It is generated from these files:

jobs.proto

It has these top-level messages:

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

Index

Constants

This section is empty.

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 ContextMetaFilterType_name = map[int32]string{
	0: "RequestMeta",
	1: "ContextUser",
}
View Source
var ContextMetaFilterType_value = map[string]int32{
	"RequestMeta": 0,
	"ContextUser": 1,
}
View Source
var IdmSelectorType_name = map[int32]string{
	0: "User",
	1: "Role",
	2: "Workspace",
	3: "Acl",
}
View Source
var IdmSelectorType_value = map[string]int32{
	"User":      0,
	"Role":      1,
	"Workspace": 2,
	"Acl":       3,
}
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 EvaluateFieldStr

func EvaluateFieldStr(ctx context.Context, input ActionMessage, value string) string

EvaluateFieldStr goes through all registered evaluators to modify string value on the fly

func EvaluateFieldStrSlice

func EvaluateFieldStrSlice(ctx context.Context, input ActionMessage, values []string) []string

EvaluateFieldStr goes through all registered evaluators to modify string value on the fly

func IdmChangeEventName added in v1.5.0

func IdmChangeEventName(objectType IdmSelectorType, 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 added in v1.5.0

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 RegisterFieldEvaluator

func RegisterFieldEvaluator(evaluator FieldEvaluator)

RegisterFieldEvaluator adds a new evaluator to internal registry

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"`
	// User-defined label for this action
	Label string `protobuf:"bytes,13,opt,name=Label" json:"Label,omitempty"`
	// User-defined comment for this action
	Description string `protobuf:"bytes,14,opt,name=Description" json:"Description,omitempty"`
	// Nodes Selector
	NodesSelector *NodesSelector `protobuf:"bytes,2,opt,name=NodesSelector" json:"NodesSelector,omitempty"`
	// Users Selector (deprecated in favor of IdmSelector)
	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 (deprecated in favor of IdmSelector)
	UsersFilter *UsersSelector `protobuf:"bytes,5,opt,name=UsersFilter" json:"UsersFilter,omitempty"`
	// Idm objects collector
	IdmSelector *IdmSelector `protobuf:"bytes,9,opt,name=IdmSelector" json:"IdmSelector,omitempty"`
	// Idm objects filter
	IdmFilter *IdmSelector `protobuf:"bytes,10,opt,name=IdmFilter" json:"IdmFilter,omitempty"`
	// Previous action output filter
	ActionOutputFilter *ActionOutputFilter `protobuf:"bytes,6,opt,name=ActionOutputFilter" json:"ActionOutputFilter,omitempty"`
	// Metadata policy-based filter
	ContextMetaFilter *ContextMetaFilter `protobuf:"bytes,11,opt,name=ContextMetaFilter" json:"ContextMetaFilter,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"`
	// If any Filter is used, next actions can be triggered on Failure
	// This adds ability to create conditional Yes/No branches
	FailedFilterActions []*Action `protobuf:"bytes,12,rep,name=FailedFilterActions" json:"FailedFilterActions,omitempty"`
}

func (*Action) ApplyFilters

func (a *Action) ApplyFilters(ctx context.Context, input ActionMessage) (output ActionMessage, excluded *ActionMessage, passThrough bool)

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) GetActionOutputFilter

func (m *Action) GetActionOutputFilter() *ActionOutputFilter

func (*Action) GetChainedActions

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

func (*Action) GetContextMetaFilter

func (m *Action) GetContextMetaFilter() *ContextMetaFilter

func (*Action) GetDescription

func (m *Action) GetDescription() string

func (*Action) GetFailedFilterActions

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

func (*Action) GetID

func (m *Action) GetID() string

func (*Action) GetIdmFilter

func (m *Action) GetIdmFilter() *IdmSelector

func (*Action) GetIdmSelector

func (m *Action) GetIdmSelector() *IdmSelector

func (*Action) GetLabel

func (m *Action) GetLabel() 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) 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 added in v1.5.0

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, failedFilter 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 {
	// Initial event that triggered the Job
	Event *google_protobuf.Any `protobuf:"bytes,1,opt,name=Event" json:"Event,omitempty"`
	// One or more Node
	Nodes []*tree.Node `protobuf:"bytes,2,rep,name=Nodes" json:"Nodes,omitempty"`
	// One or more User
	Users []*idm.User `protobuf:"bytes,3,rep,name=Users" json:"Users,omitempty"`
	// One or more Role
	Roles []*idm.Role `protobuf:"bytes,6,rep,name=Roles" json:"Roles,omitempty"`
	// One or more Workspace
	Workspaces []*idm.Workspace `protobuf:"bytes,7,rep,name=Workspaces" json:"Workspaces,omitempty"`
	// One or more ACL
	Acls []*idm.ACL `protobuf:"bytes,8,rep,name=Acls" json:"Acls,omitempty"`
	// One or more Activity
	Activities []*activity.Object `protobuf:"bytes,4,rep,name=Activities" json:"Activities,omitempty"`
	// Stack of ActionOutput messages appended by all previous actions
	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) GetAcls

func (m *ActionMessage) GetAcls() []*idm.ACL

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) GetRoles

func (m *ActionMessage) GetRoles() []*idm.Role

func (*ActionMessage) GetUsers

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

func (*ActionMessage) GetWorkspaces

func (m *ActionMessage) GetWorkspaces() []*idm.Workspace

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) WithAcl

func (a *ActionMessage) WithAcl(acl *idm.ACL) ActionMessage

func (*ActionMessage) WithAcls

func (a *ActionMessage) WithAcls(aa ...*idm.ACL) ActionMessage

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) WithRole

func (a *ActionMessage) WithRole(r *idm.Role) ActionMessage

func (*ActionMessage) WithRoles

func (a *ActionMessage) WithRoles(r ...*idm.Role) ActionMessage

func (*ActionMessage) WithUser

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

func (*ActionMessage) WithUsers

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

func (*ActionMessage) WithWorkspace

func (a *ActionMessage) WithWorkspace(ws *idm.Workspace) ActionMessage

func (*ActionMessage) WithWorkspaces

func (a *ActionMessage) WithWorkspaces(ws ...*idm.Workspace) ActionMessage

type ActionOutput

type ActionOutput struct {
	// True if action succeeded
	Success bool `protobuf:"varint,1,opt,name=Success" json:"Success,omitempty"`
	// Arbitrary bytes sequence
	RawBody []byte `protobuf:"bytes,2,opt,name=RawBody,proto3" json:"RawBody,omitempty"`
	// Arbitrary string
	StringBody string `protobuf:"bytes,3,opt,name=StringBody" json:"StringBody,omitempty"`
	// Arbitrary JSON-encoded bytes
	JsonBody []byte `protobuf:"bytes,4,opt,name=JsonBody,proto3" json:"JsonBody,omitempty"`
	// Error
	ErrorString string `protobuf:"bytes,5,opt,name=ErrorString" json:"ErrorString,omitempty"`
	// If action was returned WithIgnore()
	Ignored bool `protobuf:"varint,6,opt,name=Ignored" json:"Ignored,omitempty"`
	// Time taken to run the action
	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 added in v1.2.4

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 ActionOutputFilter

type ActionOutputFilter struct {
	// Query built from ActionOutputSingleQuery
	Query *service.Query `protobuf:"bytes,1,opt,name=Query" json:"Query,omitempty"`
}

ActionOutputFilter can be used to filter last message output

func (*ActionOutputFilter) Descriptor

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

func (*ActionOutputFilter) Filter

func (*ActionOutputFilter) GetQuery

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

func (*ActionOutputFilter) ProtoMessage

func (*ActionOutputFilter) ProtoMessage()

func (*ActionOutputFilter) Reset

func (m *ActionOutputFilter) Reset()

func (*ActionOutputFilter) String

func (m *ActionOutputFilter) String() string

func (*ActionOutputFilter) Validate

func (this *ActionOutputFilter) Validate() error

type ActionOutputSingleQuery

type ActionOutputSingleQuery struct {
	// Check if ActionOutput has success
	IsSuccess bool `protobuf:"varint,1,opt,name=IsSuccess" json:"IsSuccess,omitempty"`
	// Occurrence of string in StringBody or JsonBody (as string)
	StringBodyRegexp string `protobuf:"bytes,2,opt,name=StringBodyRegexp" json:"StringBodyRegexp,omitempty"`
	// StringBody or JsonBody size bigger than
	StringBodySizeGreaterThan int32 `protobuf:"varint,3,opt,name=StringBodySizeGreaterThan" json:"StringBodySizeGreaterThan,omitempty"`
	// StringBody or JsonBody size smaller than
	StringBodySizeSmallerThan int32 `protobuf:"varint,4,opt,name=StringBodySizeSmallerThan" json:"StringBodySizeSmallerThan,omitempty"`
	// Exact match of StringBody or JsonBody (as string)
	JsonBodyRegexp string `protobuf:"bytes,5,opt,name=JsonBodyRegexp" json:"JsonBodyRegexp,omitempty"`
	// Check existence of key in json body
	JsonBodyHasKey string `protobuf:"bytes,6,opt,name=JsonBodyHasKey" json:"JsonBodyHasKey,omitempty"`
	// StringBody or JsonBody size bigger than
	JsonBodySizeGreaterThan int32 `protobuf:"varint,7,opt,name=JsonBodySizeGreaterThan" json:"JsonBodySizeGreaterThan,omitempty"`
	// StringBody or JsonBody size smaller than
	JsonBodySizeSmallerThan int32 `protobuf:"varint,8,opt,name=JsonBodySizeSmallerThan" json:"JsonBodySizeSmallerThan,omitempty"`
	// Time taken greater than
	TaskTimeGt int32 `protobuf:"varint,9,opt,name=TaskTimeGt" json:"TaskTimeGt,omitempty"`
	// Time taken shorter than
	TaskTimeLt int32 `protobuf:"varint,10,opt,name=TaskTimeLt" json:"TaskTimeLt,omitempty"`
	// Check occurrence on error string
	ErrorStringRegexp string `protobuf:"bytes,11,opt,name=ErrorStringRegexp" json:"ErrorStringRegexp,omitempty"`
	// Invert condition
	Not bool `protobuf:"varint,12,opt,name=Not" json:"Not,omitempty"`
}

ActionOutputSingleQuery provides a unitary query to filter ActionOutput messages

func (*ActionOutputSingleQuery) Descriptor

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

func (*ActionOutputSingleQuery) GetErrorStringRegexp

func (m *ActionOutputSingleQuery) GetErrorStringRegexp() string

func (*ActionOutputSingleQuery) GetIsSuccess

func (m *ActionOutputSingleQuery) GetIsSuccess() bool

func (*ActionOutputSingleQuery) GetJsonBodyHasKey

func (m *ActionOutputSingleQuery) GetJsonBodyHasKey() string

func (*ActionOutputSingleQuery) GetJsonBodyRegexp

func (m *ActionOutputSingleQuery) GetJsonBodyRegexp() string

func (*ActionOutputSingleQuery) GetJsonBodySizeGreaterThan

func (m *ActionOutputSingleQuery) GetJsonBodySizeGreaterThan() int32

func (*ActionOutputSingleQuery) GetJsonBodySizeSmallerThan

func (m *ActionOutputSingleQuery) GetJsonBodySizeSmallerThan() int32

func (*ActionOutputSingleQuery) GetNot

func (m *ActionOutputSingleQuery) GetNot() bool

func (*ActionOutputSingleQuery) GetStringBodyRegexp

func (m *ActionOutputSingleQuery) GetStringBodyRegexp() string

func (*ActionOutputSingleQuery) GetStringBodySizeGreaterThan

func (m *ActionOutputSingleQuery) GetStringBodySizeGreaterThan() int32

func (*ActionOutputSingleQuery) GetStringBodySizeSmallerThan

func (m *ActionOutputSingleQuery) GetStringBodySizeSmallerThan() int32

func (*ActionOutputSingleQuery) GetTaskTimeGt

func (m *ActionOutputSingleQuery) GetTaskTimeGt() int32

func (*ActionOutputSingleQuery) GetTaskTimeLt

func (m *ActionOutputSingleQuery) GetTaskTimeLt() int32

func (*ActionOutputSingleQuery) ProtoMessage

func (*ActionOutputSingleQuery) ProtoMessage()

func (*ActionOutputSingleQuery) Reset

func (m *ActionOutputSingleQuery) Reset()

func (*ActionOutputSingleQuery) String

func (m *ActionOutputSingleQuery) String() string

func (*ActionOutputSingleQuery) Validate

func (this *ActionOutputSingleQuery) 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 ContextMetaFilter

type ContextMetaFilter struct {
	// Type of context filter
	Type ContextMetaFilterType `protobuf:"varint,1,opt,name=Type,enum=jobs.ContextMetaFilterType" json:"Type,omitempty"`
	// Can be built with ContextMetaSingleQuery
	Query *service.Query `protobuf:"bytes,2,opt,name=Query" json:"Query,omitempty"`
}

PolicyContextFilter can be used to filter request metadata

func (*ContextMetaFilter) Descriptor

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

func (*ContextMetaFilter) Filter

func (*ContextMetaFilter) GetQuery

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

func (*ContextMetaFilter) GetType

func (*ContextMetaFilter) ProtoMessage

func (*ContextMetaFilter) ProtoMessage()

func (*ContextMetaFilter) Reset

func (m *ContextMetaFilter) Reset()

func (*ContextMetaFilter) String

func (m *ContextMetaFilter) String() string

func (*ContextMetaFilter) Validate

func (this *ContextMetaFilter) Validate() error

type ContextMetaFilterType

type ContextMetaFilterType int32
const (
	ContextMetaFilterType_RequestMeta ContextMetaFilterType = 0
	ContextMetaFilterType_ContextUser ContextMetaFilterType = 1
)

func (ContextMetaFilterType) EnumDescriptor

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

func (ContextMetaFilterType) String

func (x ContextMetaFilterType) String() string

type ContextMetaSingleQuery

type ContextMetaSingleQuery struct {
	// Condition applies to FieldName
	FieldName string `protobuf:"bytes,1,opt,name=FieldName" json:"FieldName,omitempty"`
	// PolicyCondition
	Condition *idm.PolicyCondition `protobuf:"bytes,2,opt,name=Condition" json:"Condition,omitempty"`
}

ContextMetaSingleQuery uses idm.PolicyCondition

func (*ContextMetaSingleQuery) Descriptor

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

func (*ContextMetaSingleQuery) GetCondition

func (m *ContextMetaSingleQuery) GetCondition() *idm.PolicyCondition

func (*ContextMetaSingleQuery) GetFieldName

func (m *ContextMetaSingleQuery) GetFieldName() string

func (*ContextMetaSingleQuery) ProtoMessage

func (*ContextMetaSingleQuery) ProtoMessage()

func (*ContextMetaSingleQuery) Reset

func (m *ContextMetaSingleQuery) Reset()

func (*ContextMetaSingleQuery) String

func (m *ContextMetaSingleQuery) String() string

func (*ContextMetaSingleQuery) Validate

func (this *ContextMetaSingleQuery) Validate() error

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 FieldEvaluator

type FieldEvaluator interface {
	EvaluateField(ctx context.Context, input ActionMessage, value string) string
}

func GetFieldEvaluators

func GetFieldEvaluators() []FieldEvaluator

GetFieldEvaluators lists all registered evaluators

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 IdmSelector

type IdmSelector struct {
	// Type of objects to look for
	Type IdmSelectorType `protobuf:"varint,1,opt,name=Type,enum=jobs.IdmSelectorType" json:"Type,omitempty"`
	// Load all objects
	All bool `protobuf:"varint,2,opt,name=All" json:"All,omitempty"`
	// Serialized search query
	Query *service.Query `protobuf:"bytes,3,opt,name=Query" json:"Query,omitempty"`
	// Pass a slice of objects to one action, or trigger all actions in parallel
	Collect bool `protobuf:"varint,4,opt,name=Collect" json:"Collect,omitempty"`
}

Generic container for select/filter idm objects

func (*IdmSelector) Descriptor

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

func (*IdmSelector) Filter

Filter IDM objects by a query

func (*IdmSelector) GetAll

func (m *IdmSelector) GetAll() bool

func (*IdmSelector) GetCollect

func (m *IdmSelector) GetCollect() bool

func (*IdmSelector) GetQuery

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

func (*IdmSelector) GetType

func (m *IdmSelector) GetType() IdmSelectorType

func (*IdmSelector) MultipleSelection

func (m *IdmSelector) MultipleSelection() bool

func (*IdmSelector) ProtoMessage

func (*IdmSelector) ProtoMessage()

func (*IdmSelector) Reset

func (m *IdmSelector) Reset()

func (*IdmSelector) Select

func (m *IdmSelector) Select(cl client.Client, ctx context.Context, input ActionMessage, objects chan interface{}, done chan bool) error

Select IDM Objects by a given query

func (*IdmSelector) String

func (m *IdmSelector) String() string

func (*IdmSelector) Validate

func (this *IdmSelector) Validate() error

func (*IdmSelector) WorkspaceFromEventContext

func (m *IdmSelector) WorkspaceFromEventContext(ctx context.Context) (*idm.Workspace, bool)

type IdmSelectorType

type IdmSelectorType int32

Possible values for IdmSelector.Type

const (
	IdmSelectorType_User      IdmSelectorType = 0
	IdmSelectorType_Role      IdmSelectorType = 1
	IdmSelectorType_Workspace IdmSelectorType = 2
	IdmSelectorType_Acl       IdmSelectorType = 3
)

func (IdmSelectorType) EnumDescriptor

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

func (IdmSelectorType) String

func (x IdmSelectorType) String() string

type InputFilter

type InputFilter interface {
	Filter(ctx context.Context, input ActionMessage) (ActionMessage, bool)
}

type InputSelector

type InputSelector interface {
	Select(cl client.Client, ctx context.Context, input ActionMessage, 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"`
	// Filter out specific events
	NodeEventFilter *NodesSelector `protobuf:"bytes,15,opt,name=NodeEventFilter" json:"NodeEventFilter,omitempty"`
	// Deprecated in favor of more generic IdmSelector
	UserEventFilter *UsersSelector `protobuf:"bytes,16,opt,name=UserEventFilter" json:"UserEventFilter,omitempty"`
	// Idm objects filter
	IdmFilter *IdmSelector `protobuf:"bytes,17,opt,name=IdmFilter" json:"IdmFilter,omitempty"`
	// Event Context Filter
	ContextMetaFilter *ContextMetaFilter `protobuf:"bytes,18,opt,name=ContextMetaFilter" json:"ContextMetaFilter,omitempty"`
	// Job-level parameters that can be passed to underlying actions
	Parameters []*JobParameter `protobuf:"bytes,19,rep,name=Parameters" json:"Parameters,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) GetContextMetaFilter

func (m *Job) GetContextMetaFilter() *ContextMetaFilter

func (*Job) GetEventNames

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

func (*Job) GetID

func (m *Job) GetID() string

func (*Job) GetIdmFilter

func (m *Job) GetIdmFilter() *IdmSelector

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 added in v1.5.0

func (m *Job) GetNodeEventFilter() *NodesSelector

func (*Job) GetOwner

func (m *Job) GetOwner() string

func (*Job) GetParameters

func (m *Job) GetParameters() []*JobParameter

func (*Job) GetSchedule

func (m *Job) GetSchedule() *Schedule

func (*Job) GetTasks

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

func (*Job) GetTasksSilentUpdate added in v1.2.0

func (m *Job) GetTasksSilentUpdate() bool

func (*Job) GetUserEventFilter added in v1.5.0

func (m *Job) GetUserEventFilter() *UsersSelector

func (*Job) MarshalLogObject added in v1.5.0

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 JobParameter

type JobParameter struct {
	// Parameter name
	Name string `protobuf:"bytes,1,opt,name=Name" json:"Name,omitempty"`
	// Additional description
	Description string `protobuf:"bytes,2,opt,name=Description" json:"Description,omitempty"`
	// Value saved for this parameter
	Value string `protobuf:"bytes,4,opt,name=Value" json:"Value,omitempty"`
	// If mandatory, job cannot start without a value
	Mandatory bool `protobuf:"varint,3,opt,name=Mandatory" json:"Mandatory,omitempty"`
	// Parameter type used in GUI forms
	Type string `protobuf:"bytes,5,opt,name=Type" json:"Type,omitempty"`
	// Additional data used by GUI elements
	JsonChoices string `protobuf:"bytes,6,opt,name=JsonChoices" json:"JsonChoices,omitempty"`
}

func (*JobParameter) Descriptor

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

func (*JobParameter) GetDescription

func (m *JobParameter) GetDescription() string

func (*JobParameter) GetJsonChoices

func (m *JobParameter) GetJsonChoices() string

func (*JobParameter) GetMandatory

func (m *JobParameter) GetMandatory() bool

func (*JobParameter) GetName

func (m *JobParameter) GetName() string

func (*JobParameter) GetType

func (m *JobParameter) GetType() string

func (*JobParameter) GetValue

func (m *JobParameter) GetValue() string

func (*JobParameter) ProtoMessage

func (*JobParameter) ProtoMessage()

func (*JobParameter) Reset

func (m *JobParameter) Reset()

func (*JobParameter) String

func (m *JobParameter) String() string

func (*JobParameter) Validate

func (this *JobParameter) 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 added in v1.4.0

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

func (*ListJobsRequest) GetLoadTasks

func (m *ListJobsRequest) GetLoadTasks() TaskStatus

func (*ListJobsRequest) GetOwner

func (m *ListJobsRequest) GetOwner() string

func (*ListJobsRequest) GetTasksLimit added in v1.4.0

func (m *ListJobsRequest) GetTasksLimit() int32

func (*ListJobsRequest) GetTasksOffset added in v1.4.0

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"`
	// 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 (*NodesSelector) GetAll

func (m *NodesSelector) GetAll() bool

func (*NodesSelector) GetCollect

func (m *NodesSelector) GetCollect() bool

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, input ActionMessage, 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 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 added in v1.4.0

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 added in v1.5.0

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 added in v1.4.0

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"`
}

Select or filter users - should be replaced by more generic IdmSelector

func (*UsersSelector) Descriptor

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

func (*UsersSelector) Filter

func (n *UsersSelector) Filter(ctx context.Context, input ActionMessage) (ActionMessage, bool)

Filter is not implemented. Use IdmSelector object instead

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 (m *UsersSelector) MultipleSelection() bool

func (*UsersSelector) ProtoMessage

func (*UsersSelector) ProtoMessage()

func (*UsersSelector) Reset

func (m *UsersSelector) Reset()

func (*UsersSelector) Select

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

Select performs a query on the User Service to load a list of users. The more generic IdmSelector should be used instead.

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