Documentation ¶
Index ¶
- Constants
- Variables
- func NewSparkMetadataFromGrpcRequest(ctx context.Context, req *ExecuteJobRequest) sparkMetadata
- func NewStageError(err error, opts ...ErrorOption) *stageError
- func RegisterAgentServiceServer(s grpc.ServiceRegistrar, srv AgentServiceServer)
- func RegisterManagerServiceServer(s grpc.ServiceRegistrar, srv ManagerServiceServer)
- type AgentServiceClient
- type AgentServiceServer
- type Builder
- type BuilderChain
- type Chain
- type ChainBuilder
- func (c *ChainBuilder) Cancelled(newNode Chain) ChainComplete
- func (c *ChainBuilder) Compensate(newNode Chain) ChainCancelledOrComplete
- func (c *ChainBuilder) Complete(completeDefinitionFn CompleteDefinitionFn, options ...StageOption) Chain
- func (c *ChainBuilder) NewChain(name string) BuilderChain
- func (c *ChainBuilder) Stage(name string, stageDefinitionFn StageDefinitionFn, options ...StageOption) ChainStageAny
- type ChainCancelled
- type ChainCancelledOrComplete
- type ChainCompensate
- type ChainComplete
- type ChainFinalizer
- type ChainNode
- type ChainReport
- type ChainReportNode
- type ChainReportStage
- type ChainStage
- type ChainStageAny
- type CompleteContext
- type CompleteDefinitionFn
- type Config
- type Context
- type DelegateCompleteDefinitionFn
- type DelegateStageDefinitionFn
- type Error
- func (*Error) Descriptor() ([]byte, []int)deprecated
- func (x *Error) GetError() string
- func (x *Error) GetErrorCode() uint32
- func (x *Error) GetErrorType() ErrorType
- func (x *Error) GetMetadata() *structpb.Value
- func (x *Error) GetRetry() *RetryStrategy
- func (*Error) ProtoMessage()
- func (x *Error) ProtoReflect() protoreflect.Message
- func (x *Error) Reset()
- func (x *Error) String() string
- type ErrorOption
- type ErrorType
- type ExecuteJobRequest
- func (*ExecuteJobRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ExecuteJobRequest) GetCorrelationId() string
- func (x *ExecuteJobRequest) GetKey() string
- func (x *ExecuteJobRequest) GetLastActiveStage() *LastActiveStage
- func (x *ExecuteJobRequest) GetTransactionId() string
- func (*ExecuteJobRequest) ProtoMessage()
- func (x *ExecuteJobRequest) ProtoReflect() protoreflect.Message
- func (x *ExecuteJobRequest) Reset()
- func (x *ExecuteJobRequest) String() string
- type ExecuteJobResponse
- func (*ExecuteJobResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ExecuteJobResponse) GetAgentId() string
- func (*ExecuteJobResponse) ProtoMessage()
- func (x *ExecuteJobResponse) ProtoReflect() protoreflect.Message
- func (x *ExecuteJobResponse) Reset()
- func (x *ExecuteJobResponse) String() string
- type GetStageResultRequest
- func (*GetStageResultRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetStageResultRequest) GetJobKey() string
- func (x *GetStageResultRequest) GetName() string
- func (*GetStageResultRequest) ProtoMessage()
- func (x *GetStageResultRequest) ProtoReflect() protoreflect.Message
- func (x *GetStageResultRequest) Reset()
- func (x *GetStageResultRequest) String() string
- type GetStageResultResponse
- func (*GetStageResultResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetStageResultResponse) GetResult() *StageResult
- func (*GetStageResultResponse) ProtoMessage()
- func (x *GetStageResultResponse) ProtoReflect() protoreflect.Message
- func (x *GetStageResultResponse) Reset()
- func (x *GetStageResultResponse) String() string
- type GetStageStatusRequest
- func (*GetStageStatusRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetStageStatusRequest) GetJobKey() string
- func (x *GetStageStatusRequest) GetName() string
- func (*GetStageStatusRequest) ProtoMessage()
- func (x *GetStageStatusRequest) ProtoReflect() protoreflect.Message
- func (x *GetStageStatusRequest) Reset()
- func (x *GetStageStatusRequest) String() string
- type GetStageStatusResponse
- func (*GetStageStatusResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetStageStatusResponse) GetStatus() StageStatus
- func (*GetStageStatusResponse) ProtoMessage()
- func (x *GetStageStatusResponse) ProtoReflect() protoreflect.Message
- func (x *GetStageStatusResponse) Reset()
- func (x *GetStageStatusResponse) String() string
- type GetVariablesRequest
- func (*GetVariablesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetVariablesRequest) GetJobKey() string
- func (x *GetVariablesRequest) GetName() []string
- func (x *GetVariablesRequest) GetStage() string
- func (*GetVariablesRequest) ProtoMessage()
- func (x *GetVariablesRequest) ProtoReflect() protoreflect.Message
- func (x *GetVariablesRequest) Reset()
- func (x *GetVariablesRequest) String() string
- type GetVariablesResponse
- func (*GetVariablesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetVariablesResponse) GetVariables() map[string]*Variable
- func (*GetVariablesResponse) ProtoMessage()
- func (x *GetVariablesResponse) ProtoReflect() protoreflect.Message
- func (x *GetVariablesResponse) Reset()
- func (x *GetVariablesResponse) String() string
- type IOHandler
- type Input
- type Inputs
- type JobStatus
- type LastActiveStage
- func (*LastActiveStage) Descriptor() ([]byte, []int)deprecated
- func (x *LastActiveStage) GetName() string
- func (x *LastActiveStage) GetStatus() StageStatus
- func (*LastActiveStage) ProtoMessage()
- func (x *LastActiveStage) ProtoReflect() protoreflect.Message
- func (x *LastActiveStage) Reset()
- func (x *LastActiveStage) String() string
- type Logger
- type ManagerServiceClient
- type ManagerServiceServer
- type Option
- type RegisterHeartbeatRequest
- func (*RegisterHeartbeatRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterHeartbeatRequest) GetAgentId() string
- func (*RegisterHeartbeatRequest) ProtoMessage()
- func (x *RegisterHeartbeatRequest) ProtoReflect() protoreflect.Message
- func (x *RegisterHeartbeatRequest) Reset()
- func (x *RegisterHeartbeatRequest) String() string
- type RegisterHeartbeatResponse
- type Result
- type RetryConfig
- type RetryStrategy
- func (*RetryStrategy) Descriptor() ([]byte, []int)deprecated
- func (x *RetryStrategy) GetBackoff() uint32
- func (x *RetryStrategy) GetCount() uint32
- func (*RetryStrategy) ProtoMessage()
- func (x *RetryStrategy) ProtoReflect() protoreflect.Message
- func (x *RetryStrategy) Reset()
- func (x *RetryStrategy) String() string
- type SetJobStatusRequest
- func (*SetJobStatusRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SetJobStatusRequest) GetErr() *Error
- func (x *SetJobStatusRequest) GetKey() string
- func (x *SetJobStatusRequest) GetStatus() JobStatus
- func (*SetJobStatusRequest) ProtoMessage()
- func (x *SetJobStatusRequest) ProtoReflect() protoreflect.Message
- func (x *SetJobStatusRequest) Reset()
- func (x *SetJobStatusRequest) String() string
- type SetJobStatusResponse
- type SetStageResultRequest
- func (*SetStageResultRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SetStageResultRequest) GetJobKey() string
- func (x *SetStageResultRequest) GetName() string
- func (x *SetStageResultRequest) GetResult() *StageResult
- func (*SetStageResultRequest) ProtoMessage()
- func (x *SetStageResultRequest) ProtoReflect() protoreflect.Message
- func (x *SetStageResultRequest) Reset()
- func (x *SetStageResultRequest) String() string
- type SetStageResultResponse
- type SetStageStatusRequest
- func (*SetStageStatusRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SetStageStatusRequest) GetErr() *Error
- func (x *SetStageStatusRequest) GetJobKey() string
- func (x *SetStageStatusRequest) GetName() string
- func (x *SetStageStatusRequest) GetStatus() StageStatus
- func (*SetStageStatusRequest) ProtoMessage()
- func (x *SetStageStatusRequest) ProtoReflect() protoreflect.Message
- func (x *SetStageStatusRequest) Reset()
- func (x *SetStageStatusRequest) String() string
- type SetStageStatusResponse
- type SetVariablesRequest
- func (*SetVariablesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SetVariablesRequest) GetJobKey() string
- func (x *SetVariablesRequest) GetStage() string
- func (x *SetVariablesRequest) GetVariables() map[string]*Variable
- func (*SetVariablesRequest) ProtoMessage()
- func (x *SetVariablesRequest) ProtoReflect() protoreflect.Message
- func (x *SetVariablesRequest) Reset()
- func (x *SetVariablesRequest) String() string
- type SetVariablesResponse
- type Spark
- type SparkContext
- type StageContext
- type StageDefinitionFn
- type StageError
- type StageOption
- type StageOptionParams
- type StageProgressHandler
- type StageResult
- func (x *StageResult) Bind(a any) error
- func (*StageResult) Descriptor() ([]byte, []int)deprecated
- func (x *StageResult) GetData() *structpb.Value
- func (*StageResult) ProtoMessage()
- func (x *StageResult) ProtoReflect() protoreflect.Message
- func (x *StageResult) Raw() ([]byte, error)
- func (x *StageResult) Reset()
- func (x *StageResult) String() string
- type StageStatus
- func (StageStatus) Descriptor() protoreflect.EnumDescriptor
- func (x StageStatus) Enum() *StageStatus
- func (StageStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x StageStatus) Number() protoreflect.EnumNumber
- func (x StageStatus) String() string
- func (StageStatus) Type() protoreflect.EnumType
- type UnimplementedAgentServiceServer
- type UnimplementedManagerServiceServer
- func (UnimplementedManagerServiceServer) GetStageResult(context.Context, *GetStageResultRequest) (*GetStageResultResponse, error)
- func (UnimplementedManagerServiceServer) GetStageStatus(context.Context, *GetStageStatusRequest) (*GetStageStatusResponse, error)
- func (UnimplementedManagerServiceServer) GetVariables(context.Context, *GetVariablesRequest) (*GetVariablesResponse, error)
- func (UnimplementedManagerServiceServer) RegisterHeartbeat(context.Context, *RegisterHeartbeatRequest) (*RegisterHeartbeatResponse, error)
- func (UnimplementedManagerServiceServer) SetJobStatus(context.Context, *SetJobStatusRequest) (*SetJobStatusResponse, error)
- func (UnimplementedManagerServiceServer) SetStageResult(context.Context, *SetStageResultRequest) (*SetStageResultResponse, error)
- func (UnimplementedManagerServiceServer) SetStageStatus(context.Context, *SetStageStatusRequest) (*SetStageStatusResponse, error)
- func (UnimplementedManagerServiceServer) SetVariables(context.Context, *SetVariablesRequest) (*SetVariablesResponse, error)
- type UnsafeAgentServiceServer
- type UnsafeManagerServiceServer
- type Var
- type Variable
- func (x *Variable) Bind(a any) error
- func (*Variable) Descriptor() ([]byte, []int)deprecated
- func (x *Variable) GetMimeType() string
- func (x *Variable) GetName() string
- func (x *Variable) GetValue() *structpb.Value
- func (*Variable) ProtoMessage()
- func (x *Variable) ProtoReflect() protoreflect.Message
- func (x *Variable) Raw() ([]byte, error)
- func (x *Variable) Reset()
- func (x *Variable) String() string
- type Worker
Constants ¶
const (
MimeTypeJSON = "application/json"
)
Variables ¶
var ( ErrStageDoesNotExist = errors.New("stage does not exists") ErrBindValueFailed = errors.New("bind value failed") ErrVariableNotFound = errors.New("variable not found") ErrStageNotFoundInNodeChain = errors.New("stage not found in the node chain") ErrConditionalStageSkipped = errors.New("conditional stage execution") ErrChainIsNotValid = errors.New("chain is not valid") )
var ( ErrorType_name = map[int32]string{ 0: "ERROR_TYPE_FAILED_UNSPECIFIED", 1: "ERROR_TYPE_CANCELLED", 2: "ERROR_TYPE_SKIP", 3: "ERROR_TYPE_RETRY", 4: "ERROR_TYPE_FATAL", } ErrorType_value = map[string]int32{ "ERROR_TYPE_FAILED_UNSPECIFIED": 0, "ERROR_TYPE_CANCELLED": 1, "ERROR_TYPE_SKIP": 2, "ERROR_TYPE_RETRY": 3, "ERROR_TYPE_FATAL": 4, } )
Enum value maps for ErrorType.
var ( StageStatus_name = map[int32]string{ 0: "STAGE_STATUS_PENDING_UNSPECIFIED", 1: "STAGE_STATUS_STARTED", 2: "STAGE_STATUS_COMPLETED", 3: "STAGE_STATUS_FAILED", 4: "STAGE_STATUS_SKIPPED", 5: "STAGE_STATUS_CANCELLED", } StageStatus_value = map[string]int32{ "STAGE_STATUS_PENDING_UNSPECIFIED": 0, "STAGE_STATUS_STARTED": 1, "STAGE_STATUS_COMPLETED": 2, "STAGE_STATUS_FAILED": 3, "STAGE_STATUS_SKIPPED": 4, "STAGE_STATUS_CANCELLED": 5, } )
Enum value maps for StageStatus.
var ( JobStatus_name = map[int32]string{ 0: "JOB_STATUS_WAITING_UNSPECIFIED", 1: "JOB_STATUS_RUNNING", 2: "JOB_STATUS_DONE", 3: "JOB_STATUS_CANCELED", 4: "JOB_STATUS_COMPLETION_STARTED", 5: "JOB_STATUS_COMPLETION_DONE", 6: "JOB_STATUS_COMPLETION_DONE_WITH_ERRORS", 7: "JOB_STATUS_COMPENSATION_STARTED", 8: "JOB_STATUS_COMPENSATION_DONE", 9: "JOB_STATUS_COMPENSATION_DONE_WITH_ERRORS", 10: "JOB_STATUS_CANCELLATION_STARTED", 11: "JOB_STATUS_CANCELLATION_DONE", 12: "JOB_STATUS_CANCELLATION_DONE_WITH_ERRORS", } JobStatus_value = map[string]int32{ "JOB_STATUS_WAITING_UNSPECIFIED": 0, "JOB_STATUS_RUNNING": 1, "JOB_STATUS_DONE": 2, "JOB_STATUS_CANCELED": 3, "JOB_STATUS_COMPLETION_STARTED": 4, "JOB_STATUS_COMPLETION_DONE": 5, "JOB_STATUS_COMPLETION_DONE_WITH_ERRORS": 6, "JOB_STATUS_COMPENSATION_STARTED": 7, "JOB_STATUS_COMPENSATION_DONE": 8, "JOB_STATUS_COMPENSATION_DONE_WITH_ERRORS": 9, "JOB_STATUS_CANCELLATION_STARTED": 10, "JOB_STATUS_CANCELLATION_DONE": 11, "JOB_STATUS_CANCELLATION_DONE_WITH_ERRORS": 12, } )
Enum value maps for JobStatus.
var AgentService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "sdk.spark.v1.AgentService", HandlerType: (*AgentServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ExecuteJob", Handler: _AgentService_ExecuteJob_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "pkg/api/spark/v1/spark.proto", }
AgentService_ServiceDesc is the grpc.ServiceDesc for AgentService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var CompleteError = func(ctx CompleteContext) StageError { return NewStageError(errors.New("complete failed")) }
var CompleteSuccess = func(ctx CompleteContext) StageError { return nil }
var ErrInputVariableNotFound = errors.New("input variable not found")
var File_pkg_api_spark_v1_spark_proto protoreflect.FileDescriptor
var ManagerService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "sdk.spark.v1.ManagerService", HandlerType: (*ManagerServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetStageStatus", Handler: _ManagerService_GetStageStatus_Handler, }, { MethodName: "SetStageStatus", Handler: _ManagerService_SetStageStatus_Handler, }, { MethodName: "GetStageResult", Handler: _ManagerService_GetStageResult_Handler, }, { MethodName: "SetStageResult", Handler: _ManagerService_SetStageResult_Handler, }, { MethodName: "GetVariables", Handler: _ManagerService_GetVariables_Handler, }, { MethodName: "SetVariables", Handler: _ManagerService_SetVariables_Handler, }, { MethodName: "SetJobStatus", Handler: _ManagerService_SetJobStatus_Handler, }, { MethodName: "RegisterHeartbeat", Handler: _ManagerService_RegisterHeartbeat_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "pkg/api/spark/v1/spark.proto", }
ManagerService_ServiceDesc is the grpc.ServiceDesc for ManagerService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func NewSparkMetadataFromGrpcRequest ¶
func NewSparkMetadataFromGrpcRequest(ctx context.Context, req *ExecuteJobRequest) sparkMetadata
func NewStageError ¶
func NewStageError(err error, opts ...ErrorOption) *stageError
func RegisterAgentServiceServer ¶
func RegisterAgentServiceServer(s grpc.ServiceRegistrar, srv AgentServiceServer)
func RegisterManagerServiceServer ¶
func RegisterManagerServiceServer(s grpc.ServiceRegistrar, srv ManagerServiceServer)
Types ¶
type AgentServiceClient ¶
type AgentServiceClient interface {
ExecuteJob(ctx context.Context, in *ExecuteJobRequest, opts ...grpc.CallOption) (*ExecuteJobResponse, error)
}
AgentServiceClient is the client API for AgentService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewAgentServiceClient ¶
func NewAgentServiceClient(cc grpc.ClientConnInterface) AgentServiceClient
type AgentServiceServer ¶
type AgentServiceServer interface {
ExecuteJob(context.Context, *ExecuteJobRequest) (*ExecuteJobResponse, error)
}
AgentServiceServer is the server API for AgentService service. All implementations should embed UnimplementedAgentServiceServer for forward compatibility
type Builder ¶
type Builder interface { NewChain(name string) BuilderChain ChainFinalizer }
Builder contract for the chain builder
func NewBuilder ¶
func NewBuilder() Builder
type Chain ¶
type Chain interface {
// contains filtered or unexported methods
}
Chain finalizes a node in the chain, used internally to build a part of the chain
type ChainBuilder ¶
type ChainBuilder struct {
// contains filtered or unexported fields
}
func (*ChainBuilder) Cancelled ¶
func (c *ChainBuilder) Cancelled(newNode Chain) ChainComplete
Cancelled registers a chain node at depth-1 in the chain, compensation is always on the parent so this function looks at the previous node in the chain which is always the parent
func (*ChainBuilder) Compensate ¶
func (c *ChainBuilder) Compensate(newNode Chain) ChainCancelledOrComplete
Compensate registers a chain node at depth-1 in the chain, compensation is always on the parent so this function looks at the previous node in the chain which is always the parent
func (*ChainBuilder) Complete ¶
func (c *ChainBuilder) Complete(completeDefinitionFn CompleteDefinitionFn, options ...StageOption) Chain
Complete returns a finalizer that can be used to build the node chain
func (*ChainBuilder) NewChain ¶
func (c *ChainBuilder) NewChain(name string) BuilderChain
NewChain creates a new chain with the following rules - if this is the first chain the builder sees then it's marked as the root chain - if a root chain already exists then the new chain is returned but not stored because it will be a compensation or a cancellation chain
func (*ChainBuilder) Stage ¶
func (c *ChainBuilder) Stage(name string, stageDefinitionFn StageDefinitionFn, options ...StageOption) ChainStageAny
Stage adds a stage to the current chain node, this could be at any depth of the chain
type ChainCancelled ¶
type ChainCancelled interface {
Cancelled(newNode Chain) ChainComplete
}
ChainCancelled contract the builder must implement for cancellation
type ChainCancelledOrComplete ¶
type ChainCancelledOrComplete interface { ChainCancelled ChainComplete }
ChainCancelledOrComplete allows defining only cancel or completion
type ChainCompensate ¶
type ChainCompensate interface {
Compensate(newNode Chain) ChainCancelledOrComplete
}
ChainCompensate contract the builder must implement for compensation
type ChainComplete ¶
type ChainComplete interface {
Complete(completeDefinitionFn CompleteDefinitionFn, options ...StageOption) Chain
}
ChainComplete contract the builder must implement for completion
type ChainFinalizer ¶
type ChainFinalizer interface {
// contains filtered or unexported methods
}
ChainFinalizer finalizes the entire chain, used internally to build the chain
type ChainNode ¶
type ChainNode interface { ChainStage // must have at least 1 stage }
ChainNode a node in the chain
type ChainReport ¶
type ChainReport struct { Errors []error StageMap map[string]ChainReportStage NodeMap map[string]ChainReportNode }
type ChainReportNode ¶
type ChainReportStage ¶
type ChainStage ¶
type ChainStage interface {
Stage(name string, stageDefinitionFn StageDefinitionFn, options ...StageOption) ChainStageAny
}
ChainStage a stage in the chain node
type ChainStageAny ¶
type ChainStageAny interface { ChainStage ChainCompensate ChainCancelled ChainComplete }
ChainStageAny allows defining more stages and at least 1 of each compensate, cancelled or complete
type CompleteContext ¶
type CompleteContext interface { StageContext Output(variables ...*Var) error Name() string }
func NewCompleteContext ¶
func NewCompleteContext(ctx SparkContext, name string) CompleteContext
type CompleteDefinitionFn ¶
type CompleteDefinitionFn = func(ctx CompleteContext) StageError
type Config ¶
type Config struct {
Config struct {
Health *configHealth `yaml:"health"`
Agent *configAgent `yaml:"agent"`
Server *configServer `yaml:"server"`
Log *configLog `yaml:"logging"`
App *configApp `yaml:"app"`
}
}
func (Config) AgentAddress ¶
func (Config) HealthBindTo ¶
func (Config) ServerAddress ¶
type Context ¶
type Context interface { Ctx() context.Context JobKey() string CorrelationID() string TransactionID() string LastActiveStage() *LastActiveStage }
func NewSparkMetadata ¶
func NewSparkMetadata(ctx context.Context, jobKey, correlationID, transactionID string, lastActiveStage *LastActiveStage) Context
type DelegateCompleteDefinitionFn ¶
type DelegateCompleteDefinitionFn = func(ctx CompleteContext, cb CompleteDefinitionFn) StageError
type DelegateStageDefinitionFn ¶
type DelegateStageDefinitionFn = func(ctx StageContext, cb StageDefinitionFn) (any, StageError)
type Error ¶
type Error struct { Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` ErrorCode uint32 `protobuf:"varint,2,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"` ErrorType ErrorType `protobuf:"varint,3,opt,name=error_type,json=errorType,proto3,enum=sdk.spark.v1.ErrorType" json:"error_type,omitempty"` Metadata *structpb.Value `protobuf:"bytes,4,opt,name=metadata,proto3,oneof" json:"metadata,omitempty"` Retry *RetryStrategy `protobuf:"bytes,5,opt,name=retry,proto3,oneof" json:"retry,omitempty"` // contains filtered or unexported fields }
func (*Error) Descriptor
deprecated
func (*Error) GetErrorCode ¶
func (*Error) GetErrorType ¶
func (*Error) GetMetadata ¶
func (*Error) GetRetry ¶
func (x *Error) GetRetry() *RetryStrategy
func (*Error) ProtoMessage ¶
func (*Error) ProtoMessage()
func (*Error) ProtoReflect ¶
func (x *Error) ProtoReflect() protoreflect.Message
type ErrorOption ¶
type ErrorOption = func(err *stageError) *stageError
func WithCancel ¶
func WithCancel() ErrorOption
func WithErrorCode ¶
func WithErrorCode(code uint32) ErrorOption
func WithErrorType ¶
func WithErrorType(errorType ErrorType) ErrorOption
func WithFatal ¶
func WithFatal() ErrorOption
func WithMetadata ¶
func WithMetadata(metadata any) ErrorOption
func WithSkip ¶
func WithSkip() ErrorOption
type ErrorType ¶
type ErrorType int32
func (ErrorType) Descriptor ¶
func (ErrorType) Descriptor() protoreflect.EnumDescriptor
func (ErrorType) EnumDescriptor
deprecated
func (ErrorType) Number ¶
func (x ErrorType) Number() protoreflect.EnumNumber
func (ErrorType) Type ¶
func (ErrorType) Type() protoreflect.EnumType
type ExecuteJobRequest ¶
type ExecuteJobRequest struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` TransactionId string `protobuf:"bytes,2,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` CorrelationId string `protobuf:"bytes,3,opt,name=correlation_id,json=correlationId,proto3" json:"correlation_id,omitempty"` LastActiveStage *LastActiveStage `protobuf:"bytes,4,opt,name=last_active_stage,json=lastActiveStage,proto3,oneof" json:"last_active_stage,omitempty"` // contains filtered or unexported fields }
func (*ExecuteJobRequest) Descriptor
deprecated
func (*ExecuteJobRequest) Descriptor() ([]byte, []int)
Deprecated: Use ExecuteJobRequest.ProtoReflect.Descriptor instead.
func (*ExecuteJobRequest) GetCorrelationId ¶
func (x *ExecuteJobRequest) GetCorrelationId() string
func (*ExecuteJobRequest) GetKey ¶
func (x *ExecuteJobRequest) GetKey() string
func (*ExecuteJobRequest) GetLastActiveStage ¶
func (x *ExecuteJobRequest) GetLastActiveStage() *LastActiveStage
func (*ExecuteJobRequest) GetTransactionId ¶
func (x *ExecuteJobRequest) GetTransactionId() string
func (*ExecuteJobRequest) ProtoMessage ¶
func (*ExecuteJobRequest) ProtoMessage()
func (*ExecuteJobRequest) ProtoReflect ¶
func (x *ExecuteJobRequest) ProtoReflect() protoreflect.Message
func (*ExecuteJobRequest) Reset ¶
func (x *ExecuteJobRequest) Reset()
func (*ExecuteJobRequest) String ¶
func (x *ExecuteJobRequest) String() string
type ExecuteJobResponse ¶
type ExecuteJobResponse struct { AgentId string `protobuf:"bytes,1,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"` // contains filtered or unexported fields }
func (*ExecuteJobResponse) Descriptor
deprecated
func (*ExecuteJobResponse) Descriptor() ([]byte, []int)
Deprecated: Use ExecuteJobResponse.ProtoReflect.Descriptor instead.
func (*ExecuteJobResponse) GetAgentId ¶
func (x *ExecuteJobResponse) GetAgentId() string
func (*ExecuteJobResponse) ProtoMessage ¶
func (*ExecuteJobResponse) ProtoMessage()
func (*ExecuteJobResponse) ProtoReflect ¶
func (x *ExecuteJobResponse) ProtoReflect() protoreflect.Message
func (*ExecuteJobResponse) Reset ¶
func (x *ExecuteJobResponse) Reset()
func (*ExecuteJobResponse) String ¶
func (x *ExecuteJobResponse) String() string
type GetStageResultRequest ¶
type GetStageResultRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` JobKey string `protobuf:"bytes,2,opt,name=job_key,json=jobKey,proto3" json:"job_key,omitempty"` // contains filtered or unexported fields }
func NewStageResultReq ¶
func NewStageResultReq(jobKey, stageName string) *GetStageResultRequest
func (*GetStageResultRequest) Descriptor
deprecated
func (*GetStageResultRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetStageResultRequest.ProtoReflect.Descriptor instead.
func (*GetStageResultRequest) GetJobKey ¶
func (x *GetStageResultRequest) GetJobKey() string
func (*GetStageResultRequest) GetName ¶
func (x *GetStageResultRequest) GetName() string
func (*GetStageResultRequest) ProtoMessage ¶
func (*GetStageResultRequest) ProtoMessage()
func (*GetStageResultRequest) ProtoReflect ¶
func (x *GetStageResultRequest) ProtoReflect() protoreflect.Message
func (*GetStageResultRequest) Reset ¶
func (x *GetStageResultRequest) Reset()
func (*GetStageResultRequest) String ¶
func (x *GetStageResultRequest) String() string
type GetStageResultResponse ¶
type GetStageResultResponse struct { Result *StageResult `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` // contains filtered or unexported fields }
func (*GetStageResultResponse) Descriptor
deprecated
func (*GetStageResultResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetStageResultResponse.ProtoReflect.Descriptor instead.
func (*GetStageResultResponse) GetResult ¶
func (x *GetStageResultResponse) GetResult() *StageResult
func (*GetStageResultResponse) ProtoMessage ¶
func (*GetStageResultResponse) ProtoMessage()
func (*GetStageResultResponse) ProtoReflect ¶
func (x *GetStageResultResponse) ProtoReflect() protoreflect.Message
func (*GetStageResultResponse) Reset ¶
func (x *GetStageResultResponse) Reset()
func (*GetStageResultResponse) String ¶
func (x *GetStageResultResponse) String() string
type GetStageStatusRequest ¶
type GetStageStatusRequest struct { JobKey string `protobuf:"bytes,1,opt,name=job_key,json=jobKey,proto3" json:"job_key,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func NewGetStageStatusReq ¶
func NewGetStageStatusReq(jobKey, stageName string) *GetStageStatusRequest
func (*GetStageStatusRequest) Descriptor
deprecated
func (*GetStageStatusRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetStageStatusRequest.ProtoReflect.Descriptor instead.
func (*GetStageStatusRequest) GetJobKey ¶
func (x *GetStageStatusRequest) GetJobKey() string
func (*GetStageStatusRequest) GetName ¶
func (x *GetStageStatusRequest) GetName() string
func (*GetStageStatusRequest) ProtoMessage ¶
func (*GetStageStatusRequest) ProtoMessage()
func (*GetStageStatusRequest) ProtoReflect ¶
func (x *GetStageStatusRequest) ProtoReflect() protoreflect.Message
func (*GetStageStatusRequest) Reset ¶
func (x *GetStageStatusRequest) Reset()
func (*GetStageStatusRequest) String ¶
func (x *GetStageStatusRequest) String() string
type GetStageStatusResponse ¶
type GetStageStatusResponse struct { Status StageStatus `protobuf:"varint,1,opt,name=status,proto3,enum=sdk.spark.v1.StageStatus" json:"status,omitempty"` // contains filtered or unexported fields }
func (*GetStageStatusResponse) Descriptor
deprecated
func (*GetStageStatusResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetStageStatusResponse.ProtoReflect.Descriptor instead.
func (*GetStageStatusResponse) GetStatus ¶
func (x *GetStageStatusResponse) GetStatus() StageStatus
func (*GetStageStatusResponse) ProtoMessage ¶
func (*GetStageStatusResponse) ProtoMessage()
func (*GetStageStatusResponse) ProtoReflect ¶
func (x *GetStageStatusResponse) ProtoReflect() protoreflect.Message
func (*GetStageStatusResponse) Reset ¶
func (x *GetStageStatusResponse) Reset()
func (*GetStageStatusResponse) String ¶
func (x *GetStageStatusResponse) String() string
type GetVariablesRequest ¶
type GetVariablesRequest struct { Stage string `protobuf:"bytes,1,opt,name=stage,proto3" json:"stage,omitempty"` JobKey string `protobuf:"bytes,2,opt,name=job_key,json=jobKey,proto3" json:"job_key,omitempty"` Name []string `protobuf:"bytes,3,rep,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func NewGetVariablesRequest ¶
func NewGetVariablesRequest(jobKey string, names ...string) *GetVariablesRequest
func (*GetVariablesRequest) Descriptor
deprecated
func (*GetVariablesRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetVariablesRequest.ProtoReflect.Descriptor instead.
func (*GetVariablesRequest) GetJobKey ¶
func (x *GetVariablesRequest) GetJobKey() string
func (*GetVariablesRequest) GetName ¶
func (x *GetVariablesRequest) GetName() []string
func (*GetVariablesRequest) GetStage ¶
func (x *GetVariablesRequest) GetStage() string
func (*GetVariablesRequest) ProtoMessage ¶
func (*GetVariablesRequest) ProtoMessage()
func (*GetVariablesRequest) ProtoReflect ¶
func (x *GetVariablesRequest) ProtoReflect() protoreflect.Message
func (*GetVariablesRequest) Reset ¶
func (x *GetVariablesRequest) Reset()
func (*GetVariablesRequest) String ¶
func (x *GetVariablesRequest) String() string
type GetVariablesResponse ¶
type GetVariablesResponse struct { Variables map[string]*Variable `` /* 159-byte string literal not displayed */ // contains filtered or unexported fields }
func (*GetVariablesResponse) Descriptor
deprecated
func (*GetVariablesResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetVariablesResponse.ProtoReflect.Descriptor instead.
func (*GetVariablesResponse) GetVariables ¶
func (x *GetVariablesResponse) GetVariables() map[string]*Variable
func (*GetVariablesResponse) ProtoMessage ¶
func (*GetVariablesResponse) ProtoMessage()
func (*GetVariablesResponse) ProtoReflect ¶
func (x *GetVariablesResponse) ProtoReflect() protoreflect.Message
func (*GetVariablesResponse) Reset ¶
func (x *GetVariablesResponse) Reset()
func (*GetVariablesResponse) String ¶
func (x *GetVariablesResponse) String() string
type JobStatus ¶
type JobStatus int32
const ( JobStatus_JOB_STATUS_WAITING_UNSPECIFIED JobStatus = 0 JobStatus_JOB_STATUS_RUNNING JobStatus = 1 JobStatus_JOB_STATUS_DONE JobStatus = 2 JobStatus_JOB_STATUS_CANCELED JobStatus = 3 JobStatus_JOB_STATUS_COMPLETION_STARTED JobStatus = 4 JobStatus_JOB_STATUS_COMPLETION_DONE JobStatus = 5 JobStatus_JOB_STATUS_COMPLETION_DONE_WITH_ERRORS JobStatus = 6 JobStatus_JOB_STATUS_COMPENSATION_STARTED JobStatus = 7 JobStatus_JOB_STATUS_COMPENSATION_DONE JobStatus = 8 JobStatus_JOB_STATUS_COMPENSATION_DONE_WITH_ERRORS JobStatus = 9 JobStatus_JOB_STATUS_CANCELLATION_STARTED JobStatus = 10 JobStatus_JOB_STATUS_CANCELLATION_DONE JobStatus = 11 JobStatus_JOB_STATUS_CANCELLATION_DONE_WITH_ERRORS JobStatus = 12 )
func (JobStatus) Descriptor ¶
func (JobStatus) Descriptor() protoreflect.EnumDescriptor
func (JobStatus) EnumDescriptor
deprecated
func (JobStatus) Number ¶
func (x JobStatus) Number() protoreflect.EnumNumber
func (JobStatus) Type ¶
func (JobStatus) Type() protoreflect.EnumType
type LastActiveStage ¶
type LastActiveStage struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Status StageStatus `protobuf:"varint,2,opt,name=status,proto3,enum=sdk.spark.v1.StageStatus" json:"status,omitempty"` // contains filtered or unexported fields }
func (*LastActiveStage) Descriptor
deprecated
func (*LastActiveStage) Descriptor() ([]byte, []int)
Deprecated: Use LastActiveStage.ProtoReflect.Descriptor instead.
func (*LastActiveStage) GetName ¶
func (x *LastActiveStage) GetName() string
func (*LastActiveStage) GetStatus ¶
func (x *LastActiveStage) GetStatus() StageStatus
func (*LastActiveStage) ProtoMessage ¶
func (*LastActiveStage) ProtoMessage()
func (*LastActiveStage) ProtoReflect ¶
func (x *LastActiveStage) ProtoReflect() protoreflect.Message
func (*LastActiveStage) Reset ¶
func (x *LastActiveStage) Reset()
func (*LastActiveStage) String ¶
func (x *LastActiveStage) String() string
type Logger ¶
type ManagerServiceClient ¶
type ManagerServiceClient interface { GetStageStatus(ctx context.Context, in *GetStageStatusRequest, opts ...grpc.CallOption) (*GetStageStatusResponse, error) SetStageStatus(ctx context.Context, in *SetStageStatusRequest, opts ...grpc.CallOption) (*SetStageStatusResponse, error) GetStageResult(ctx context.Context, in *GetStageResultRequest, opts ...grpc.CallOption) (*GetStageResultResponse, error) SetStageResult(ctx context.Context, in *SetStageResultRequest, opts ...grpc.CallOption) (*SetStageResultResponse, error) GetVariables(ctx context.Context, in *GetVariablesRequest, opts ...grpc.CallOption) (*GetVariablesResponse, error) SetVariables(ctx context.Context, in *SetVariablesRequest, opts ...grpc.CallOption) (*SetVariablesResponse, error) SetJobStatus(ctx context.Context, in *SetJobStatusRequest, opts ...grpc.CallOption) (*SetJobStatusResponse, error) RegisterHeartbeat(ctx context.Context, in *RegisterHeartbeatRequest, opts ...grpc.CallOption) (*RegisterHeartbeatResponse, error) }
ManagerServiceClient is the client API for ManagerService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func CreateManagerServiceClient ¶
func CreateManagerServiceClient(config *Config) (ManagerServiceClient, error)
func NewManagerServiceClient ¶
func NewManagerServiceClient(cc grpc.ClientConnInterface) ManagerServiceClient
type ManagerServiceServer ¶
type ManagerServiceServer interface { GetStageStatus(context.Context, *GetStageStatusRequest) (*GetStageStatusResponse, error) SetStageStatus(context.Context, *SetStageStatusRequest) (*SetStageStatusResponse, error) GetStageResult(context.Context, *GetStageResultRequest) (*GetStageResultResponse, error) SetStageResult(context.Context, *SetStageResultRequest) (*SetStageResultResponse, error) GetVariables(context.Context, *GetVariablesRequest) (*GetVariablesResponse, error) SetVariables(context.Context, *SetVariablesRequest) (*SetVariablesResponse, error) SetJobStatus(context.Context, *SetJobStatusRequest) (*SetJobStatusResponse, error) RegisterHeartbeat(context.Context, *RegisterHeartbeatRequest) (*RegisterHeartbeatResponse, error) }
ManagerServiceServer is the server API for ManagerService service. All implementations should embed UnimplementedManagerServiceServer for forward compatibility
type Option ¶
type Option = func(je *sparkOpts) *sparkOpts
func WithDelegateCompletion ¶
func WithDelegateCompletion(delegate DelegateCompleteDefinitionFn) Option
WithDelegateCompletion delegates execution of all completion stages TODO support delegating single completion stage by name
func WithDelegateStage ¶
func WithDelegateStage(delegate DelegateStageDefinitionFn) Option
WithDelegateStage delegates execution of all stages TODO support delegating single stage by name
func WithIOHandler ¶
func WithStageProgressHandler ¶
func WithStageProgressHandler(sph StageProgressHandler) Option
type RegisterHeartbeatRequest ¶
type RegisterHeartbeatRequest struct { AgentId string `protobuf:"bytes,1,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"` // contains filtered or unexported fields }
func (*RegisterHeartbeatRequest) Descriptor
deprecated
func (*RegisterHeartbeatRequest) Descriptor() ([]byte, []int)
Deprecated: Use RegisterHeartbeatRequest.ProtoReflect.Descriptor instead.
func (*RegisterHeartbeatRequest) GetAgentId ¶
func (x *RegisterHeartbeatRequest) GetAgentId() string
func (*RegisterHeartbeatRequest) ProtoMessage ¶
func (*RegisterHeartbeatRequest) ProtoMessage()
func (*RegisterHeartbeatRequest) ProtoReflect ¶
func (x *RegisterHeartbeatRequest) ProtoReflect() protoreflect.Message
func (*RegisterHeartbeatRequest) Reset ¶
func (x *RegisterHeartbeatRequest) Reset()
func (*RegisterHeartbeatRequest) String ¶
func (x *RegisterHeartbeatRequest) String() string
type RegisterHeartbeatResponse ¶
type RegisterHeartbeatResponse struct {
// contains filtered or unexported fields
}
func (*RegisterHeartbeatResponse) Descriptor
deprecated
func (*RegisterHeartbeatResponse) Descriptor() ([]byte, []int)
Deprecated: Use RegisterHeartbeatResponse.ProtoReflect.Descriptor instead.
func (*RegisterHeartbeatResponse) ProtoMessage ¶
func (*RegisterHeartbeatResponse) ProtoMessage()
func (*RegisterHeartbeatResponse) ProtoReflect ¶
func (x *RegisterHeartbeatResponse) ProtoReflect() protoreflect.Message
func (*RegisterHeartbeatResponse) Reset ¶
func (x *RegisterHeartbeatResponse) Reset()
func (*RegisterHeartbeatResponse) String ¶
func (x *RegisterHeartbeatResponse) String() string
type Result ¶
type Result struct {
// contains filtered or unexported fields
}
func NewResult ¶
func NewResult(err error, result *StageResult) *Result
type RetryConfig ¶
type RetryConfig struct {
// contains filtered or unexported fields
}
type RetryStrategy ¶
type RetryStrategy struct { Backoff uint32 `protobuf:"varint,1,opt,name=backoff,proto3" json:"backoff,omitempty"` Count uint32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` // contains filtered or unexported fields }
func (*RetryStrategy) Descriptor
deprecated
func (*RetryStrategy) Descriptor() ([]byte, []int)
Deprecated: Use RetryStrategy.ProtoReflect.Descriptor instead.
func (*RetryStrategy) GetBackoff ¶
func (x *RetryStrategy) GetBackoff() uint32
func (*RetryStrategy) GetCount ¶
func (x *RetryStrategy) GetCount() uint32
func (*RetryStrategy) ProtoMessage ¶
func (*RetryStrategy) ProtoMessage()
func (*RetryStrategy) ProtoReflect ¶
func (x *RetryStrategy) ProtoReflect() protoreflect.Message
func (*RetryStrategy) Reset ¶
func (x *RetryStrategy) Reset()
func (*RetryStrategy) String ¶
func (x *RetryStrategy) String() string
type SetJobStatusRequest ¶
type SetJobStatusRequest struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Status JobStatus `protobuf:"varint,2,opt,name=status,proto3,enum=sdk.spark.v1.JobStatus" json:"status,omitempty"` Err *Error `protobuf:"bytes,3,opt,name=err,proto3,oneof" json:"err,omitempty"` // contains filtered or unexported fields }
func NewSetJobStatusReq ¶
func NewSetJobStatusReq(key string, status JobStatus, err ...*Error) *SetJobStatusRequest
func (*SetJobStatusRequest) Descriptor
deprecated
func (*SetJobStatusRequest) Descriptor() ([]byte, []int)
Deprecated: Use SetJobStatusRequest.ProtoReflect.Descriptor instead.
func (*SetJobStatusRequest) GetErr ¶
func (x *SetJobStatusRequest) GetErr() *Error
func (*SetJobStatusRequest) GetKey ¶
func (x *SetJobStatusRequest) GetKey() string
func (*SetJobStatusRequest) GetStatus ¶
func (x *SetJobStatusRequest) GetStatus() JobStatus
func (*SetJobStatusRequest) ProtoMessage ¶
func (*SetJobStatusRequest) ProtoMessage()
func (*SetJobStatusRequest) ProtoReflect ¶
func (x *SetJobStatusRequest) ProtoReflect() protoreflect.Message
func (*SetJobStatusRequest) Reset ¶
func (x *SetJobStatusRequest) Reset()
func (*SetJobStatusRequest) String ¶
func (x *SetJobStatusRequest) String() string
type SetJobStatusResponse ¶
type SetJobStatusResponse struct {
// contains filtered or unexported fields
}
func (*SetJobStatusResponse) Descriptor
deprecated
func (*SetJobStatusResponse) Descriptor() ([]byte, []int)
Deprecated: Use SetJobStatusResponse.ProtoReflect.Descriptor instead.
func (*SetJobStatusResponse) ProtoMessage ¶
func (*SetJobStatusResponse) ProtoMessage()
func (*SetJobStatusResponse) ProtoReflect ¶
func (x *SetJobStatusResponse) ProtoReflect() protoreflect.Message
func (*SetJobStatusResponse) Reset ¶
func (x *SetJobStatusResponse) Reset()
func (*SetJobStatusResponse) String ¶
func (x *SetJobStatusResponse) String() string
type SetStageResultRequest ¶
type SetStageResultRequest struct { JobKey string `protobuf:"bytes,1,opt,name=job_key,json=jobKey,proto3" json:"job_key,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Result *StageResult `protobuf:"bytes,3,opt,name=result,proto3" json:"result,omitempty"` // contains filtered or unexported fields }
func NewSetStageResultReq ¶
func NewSetStageResultReq(jobKey, name string, data any) (*SetStageResultRequest, error)
func (*SetStageResultRequest) Descriptor
deprecated
func (*SetStageResultRequest) Descriptor() ([]byte, []int)
Deprecated: Use SetStageResultRequest.ProtoReflect.Descriptor instead.
func (*SetStageResultRequest) GetJobKey ¶
func (x *SetStageResultRequest) GetJobKey() string
func (*SetStageResultRequest) GetName ¶
func (x *SetStageResultRequest) GetName() string
func (*SetStageResultRequest) GetResult ¶
func (x *SetStageResultRequest) GetResult() *StageResult
func (*SetStageResultRequest) ProtoMessage ¶
func (*SetStageResultRequest) ProtoMessage()
func (*SetStageResultRequest) ProtoReflect ¶
func (x *SetStageResultRequest) ProtoReflect() protoreflect.Message
func (*SetStageResultRequest) Reset ¶
func (x *SetStageResultRequest) Reset()
func (*SetStageResultRequest) String ¶
func (x *SetStageResultRequest) String() string
type SetStageResultResponse ¶
type SetStageResultResponse struct {
// contains filtered or unexported fields
}
func (*SetStageResultResponse) Descriptor
deprecated
func (*SetStageResultResponse) Descriptor() ([]byte, []int)
Deprecated: Use SetStageResultResponse.ProtoReflect.Descriptor instead.
func (*SetStageResultResponse) ProtoMessage ¶
func (*SetStageResultResponse) ProtoMessage()
func (*SetStageResultResponse) ProtoReflect ¶
func (x *SetStageResultResponse) ProtoReflect() protoreflect.Message
func (*SetStageResultResponse) Reset ¶
func (x *SetStageResultResponse) Reset()
func (*SetStageResultResponse) String ¶
func (x *SetStageResultResponse) String() string
type SetStageStatusRequest ¶
type SetStageStatusRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` JobKey string `protobuf:"bytes,2,opt,name=job_key,json=jobKey,proto3" json:"job_key,omitempty"` Status StageStatus `protobuf:"varint,3,opt,name=status,proto3,enum=sdk.spark.v1.StageStatus" json:"status,omitempty"` Err *Error `protobuf:"bytes,4,opt,name=err,proto3" json:"err,omitempty"` // contains filtered or unexported fields }
func NewSetStageStatusReq ¶
func NewSetStageStatusReq(jobKey, stageName string, status StageStatus, err ...*Error) *SetStageStatusRequest
func (*SetStageStatusRequest) Descriptor
deprecated
func (*SetStageStatusRequest) Descriptor() ([]byte, []int)
Deprecated: Use SetStageStatusRequest.ProtoReflect.Descriptor instead.
func (*SetStageStatusRequest) GetErr ¶
func (x *SetStageStatusRequest) GetErr() *Error
func (*SetStageStatusRequest) GetJobKey ¶
func (x *SetStageStatusRequest) GetJobKey() string
func (*SetStageStatusRequest) GetName ¶
func (x *SetStageStatusRequest) GetName() string
func (*SetStageStatusRequest) GetStatus ¶
func (x *SetStageStatusRequest) GetStatus() StageStatus
func (*SetStageStatusRequest) ProtoMessage ¶
func (*SetStageStatusRequest) ProtoMessage()
func (*SetStageStatusRequest) ProtoReflect ¶
func (x *SetStageStatusRequest) ProtoReflect() protoreflect.Message
func (*SetStageStatusRequest) Reset ¶
func (x *SetStageStatusRequest) Reset()
func (*SetStageStatusRequest) String ¶
func (x *SetStageStatusRequest) String() string
type SetStageStatusResponse ¶
type SetStageStatusResponse struct {
// contains filtered or unexported fields
}
func (*SetStageStatusResponse) Descriptor
deprecated
func (*SetStageStatusResponse) Descriptor() ([]byte, []int)
Deprecated: Use SetStageStatusResponse.ProtoReflect.Descriptor instead.
func (*SetStageStatusResponse) ProtoMessage ¶
func (*SetStageStatusResponse) ProtoMessage()
func (*SetStageStatusResponse) ProtoReflect ¶
func (x *SetStageStatusResponse) ProtoReflect() protoreflect.Message
func (*SetStageStatusResponse) Reset ¶
func (x *SetStageStatusResponse) Reset()
func (*SetStageStatusResponse) String ¶
func (x *SetStageStatusResponse) String() string
type SetVariablesRequest ¶
type SetVariablesRequest struct { Stage string `protobuf:"bytes,1,opt,name=stage,proto3" json:"stage,omitempty"` JobKey string `protobuf:"bytes,2,opt,name=job_key,json=jobKey,proto3" json:"job_key,omitempty"` Variables map[string]*Variable `` /* 159-byte string literal not displayed */ // contains filtered or unexported fields }
func NewSetVariablesRequest ¶
func NewSetVariablesRequest(jobKey string, variables ...*Var) (*SetVariablesRequest, error)
func (*SetVariablesRequest) Descriptor
deprecated
func (*SetVariablesRequest) Descriptor() ([]byte, []int)
Deprecated: Use SetVariablesRequest.ProtoReflect.Descriptor instead.
func (*SetVariablesRequest) GetJobKey ¶
func (x *SetVariablesRequest) GetJobKey() string
func (*SetVariablesRequest) GetStage ¶
func (x *SetVariablesRequest) GetStage() string
func (*SetVariablesRequest) GetVariables ¶
func (x *SetVariablesRequest) GetVariables() map[string]*Variable
func (*SetVariablesRequest) ProtoMessage ¶
func (*SetVariablesRequest) ProtoMessage()
func (*SetVariablesRequest) ProtoReflect ¶
func (x *SetVariablesRequest) ProtoReflect() protoreflect.Message
func (*SetVariablesRequest) Reset ¶
func (x *SetVariablesRequest) Reset()
func (*SetVariablesRequest) String ¶
func (x *SetVariablesRequest) String() string
type SetVariablesResponse ¶
type SetVariablesResponse struct {
// contains filtered or unexported fields
}
func (*SetVariablesResponse) Descriptor
deprecated
func (*SetVariablesResponse) Descriptor() ([]byte, []int)
Deprecated: Use SetVariablesResponse.ProtoReflect.Descriptor instead.
func (*SetVariablesResponse) ProtoMessage ¶
func (*SetVariablesResponse) ProtoMessage()
func (*SetVariablesResponse) ProtoReflect ¶
func (x *SetVariablesResponse) ProtoReflect() protoreflect.Message
func (*SetVariablesResponse) Reset ¶
func (x *SetVariablesResponse) Reset()
func (*SetVariablesResponse) String ¶
func (x *SetVariablesResponse) String() string
type SparkContext ¶
type SparkContext interface { Context IOHandler() IOHandler StageProgressHandler() StageProgressHandler LastActiveStage() *LastActiveStage Log() Logger WithoutLastActiveStage() SparkContext // contains filtered or unexported methods }
func NewJobContext ¶
func NewJobContext(metadata Context, opts *sparkOpts) SparkContext
type StageContext ¶
type StageContext interface { Context Inputs(names ...string) *Inputs Input(names string) *Input StageResult(name string) *Result Log() Logger Name() string }
func NewStageContext ¶
func NewStageContext(ctx SparkContext, name string) StageContext
type StageDefinitionFn ¶
type StageDefinitionFn = func(ctx StageContext) (any, StageError)
type StageError ¶
type StageOption ¶
type StageOption = func(StageOptionParams) StageError
func WithStageStatus ¶
func WithStageStatus(stageName string, status StageStatus) StageOption
type StageOptionParams ¶
type StageOptionParams interface { StageName() string StageProgressHandler() StageProgressHandler IOHandler() IOHandler Context() Context }
type StageProgressHandler ¶
type StageProgressHandler interface { Get(jobKey, name string) (*StageStatus, error) Set(stageStatus *SetStageStatusRequest) error GetResult(jobKey, name string) *Result SetResult(resultResult *SetStageResultRequest) error SetJobStatus(jobStatus *SetJobStatusRequest) error }
type StageResult ¶
type StageResult struct { Data *structpb.Value `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*StageResult) Bind ¶
func (x *StageResult) Bind(a any) error
func (*StageResult) Descriptor
deprecated
func (*StageResult) Descriptor() ([]byte, []int)
Deprecated: Use StageResult.ProtoReflect.Descriptor instead.
func (*StageResult) GetData ¶
func (x *StageResult) GetData() *structpb.Value
func (*StageResult) ProtoMessage ¶
func (*StageResult) ProtoMessage()
func (*StageResult) ProtoReflect ¶
func (x *StageResult) ProtoReflect() protoreflect.Message
func (*StageResult) Raw ¶
func (x *StageResult) Raw() ([]byte, error)
func (*StageResult) Reset ¶
func (x *StageResult) Reset()
func (*StageResult) String ¶
func (x *StageResult) String() string
type StageStatus ¶
type StageStatus int32
const ( StageStatus_STAGE_STATUS_PENDING_UNSPECIFIED StageStatus = 0 StageStatus_STAGE_STATUS_STARTED StageStatus = 1 StageStatus_STAGE_STATUS_COMPLETED StageStatus = 2 StageStatus_STAGE_STATUS_FAILED StageStatus = 3 StageStatus_STAGE_STATUS_SKIPPED StageStatus = 4 StageStatus_STAGE_STATUS_CANCELLED StageStatus = 5 )
func ErrorTypeToStageStatus ¶
func ErrorTypeToStageStatus(errType ErrorType) StageStatus
func (StageStatus) Descriptor ¶
func (StageStatus) Descriptor() protoreflect.EnumDescriptor
func (StageStatus) Enum ¶
func (x StageStatus) Enum() *StageStatus
func (StageStatus) EnumDescriptor
deprecated
func (StageStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use StageStatus.Descriptor instead.
func (StageStatus) Number ¶
func (x StageStatus) Number() protoreflect.EnumNumber
func (StageStatus) String ¶
func (x StageStatus) String() string
func (StageStatus) Type ¶
func (StageStatus) Type() protoreflect.EnumType
type UnimplementedAgentServiceServer ¶
type UnimplementedAgentServiceServer struct { }
UnimplementedAgentServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedAgentServiceServer) ExecuteJob ¶
func (UnimplementedAgentServiceServer) ExecuteJob(context.Context, *ExecuteJobRequest) (*ExecuteJobResponse, error)
type UnimplementedManagerServiceServer ¶
type UnimplementedManagerServiceServer struct { }
UnimplementedManagerServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedManagerServiceServer) GetStageResult ¶
func (UnimplementedManagerServiceServer) GetStageResult(context.Context, *GetStageResultRequest) (*GetStageResultResponse, error)
func (UnimplementedManagerServiceServer) GetStageStatus ¶
func (UnimplementedManagerServiceServer) GetStageStatus(context.Context, *GetStageStatusRequest) (*GetStageStatusResponse, error)
func (UnimplementedManagerServiceServer) GetVariables ¶
func (UnimplementedManagerServiceServer) GetVariables(context.Context, *GetVariablesRequest) (*GetVariablesResponse, error)
func (UnimplementedManagerServiceServer) RegisterHeartbeat ¶
func (UnimplementedManagerServiceServer) RegisterHeartbeat(context.Context, *RegisterHeartbeatRequest) (*RegisterHeartbeatResponse, error)
func (UnimplementedManagerServiceServer) SetJobStatus ¶
func (UnimplementedManagerServiceServer) SetJobStatus(context.Context, *SetJobStatusRequest) (*SetJobStatusResponse, error)
func (UnimplementedManagerServiceServer) SetStageResult ¶
func (UnimplementedManagerServiceServer) SetStageResult(context.Context, *SetStageResultRequest) (*SetStageResultResponse, error)
func (UnimplementedManagerServiceServer) SetStageStatus ¶
func (UnimplementedManagerServiceServer) SetStageStatus(context.Context, *SetStageStatusRequest) (*SetStageStatusResponse, error)
func (UnimplementedManagerServiceServer) SetVariables ¶
func (UnimplementedManagerServiceServer) SetVariables(context.Context, *SetVariablesRequest) (*SetVariablesResponse, error)
type UnsafeAgentServiceServer ¶
type UnsafeAgentServiceServer interface {
// contains filtered or unexported methods
}
UnsafeAgentServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AgentServiceServer will result in compilation errors.
type UnsafeManagerServiceServer ¶
type UnsafeManagerServiceServer interface {
// contains filtered or unexported methods
}
UnsafeManagerServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ManagerServiceServer will result in compilation errors.
type Variable ¶
type Variable struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Value *structpb.Value `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` MimeType string `protobuf:"bytes,3,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"` // contains filtered or unexported fields }
func (*Variable) Descriptor
deprecated
func (*Variable) GetMimeType ¶
func (*Variable) ProtoMessage ¶
func (*Variable) ProtoMessage()
func (*Variable) ProtoReflect ¶
func (x *Variable) ProtoReflect() protoreflect.Message