jobs

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2017 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Overview

Package jobs is a generated protocol buffer package.

It is generated from these files:

cockroach/pkg/sql/jobs/jobs.proto

It has these top-level messages:

Lease
BackupDetails
RestoreDetails
ImportDetails
ResumeSpanList
SchemaChangeDetails
Payload

Index

Constants

View Source
const DefaultCancelInterval = base.DefaultHeartbeatInterval

DefaultCancelInterval is a reasonable interval at which to poll this node for liveness failures and cancel running jobs.

Variables

View Source
var (
	ErrInvalidLengthJobs = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowJobs   = fmt.Errorf("proto: integer overflow")
)
View Source
var DefaultAdoptInterval = 30 * time.Second

DefaultAdoptInterval is a reasonable interval at which to poll system.jobs for jobs with expired leases.

DefaultAdoptInterval is mutable for testing. NB: Updates to this value after Registry.Start has been called will not have any effect.

View Source
var Type_name = map[int32]string{
	0: "UNSPECIFIED",
	1: "BACKUP",
	2: "RESTORE",
	3: "SCHEMA_CHANGE",
	4: "IMPORT",
}
View Source
var Type_value = map[string]int32{
	"UNSPECIFIED":   0,
	"BACKUP":        1,
	"RESTORE":       2,
	"SCHEMA_CHANGE": 3,
	"IMPORT":        4,
}
View Source
var WithoutCancel func()

WithoutCancel indicates that the job should not have its leasing and cancelation managed by Registry. This is only a temporary measure; eventually all jobs will use the Registry's leasing and cancelation.

Functions

func AddResumeHook

func AddResumeHook(fn resumeHookFn)

AddResumeHook adds a resume hook.

func WrapPayloadDetails

func WrapPayloadDetails(details Details) interface {
	isPayload_Details
}

WrapPayloadDetails wraps a Details object in the protobuf wrapper struct necessary to make it usable as the Details field of a Payload.

Providing an unknown details type indicates programmer error and so causes a panic.

Types

type BackupDetails

type BackupDetails struct {
	StartTime cockroach_util_hlc.Timestamp `protobuf:"bytes,1,opt,name=start_time,json=startTime" json:"start_time"`
	EndTime   cockroach_util_hlc.Timestamp `protobuf:"bytes,2,opt,name=end_time,json=endTime" json:"end_time"`
	URI       string                       `protobuf:"bytes,3,opt,name=uri,proto3" json:"uri,omitempty"`
}

func (*BackupDetails) Descriptor

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

func (*BackupDetails) Marshal

func (m *BackupDetails) Marshal() (dAtA []byte, err error)

func (*BackupDetails) MarshalTo

func (m *BackupDetails) MarshalTo(dAtA []byte) (int, error)

func (*BackupDetails) ProtoMessage

func (*BackupDetails) ProtoMessage()

func (*BackupDetails) Reset

func (m *BackupDetails) Reset()

func (*BackupDetails) Size

func (m *BackupDetails) Size() (n int)

func (*BackupDetails) String

func (m *BackupDetails) String() string

func (*BackupDetails) Unmarshal

func (m *BackupDetails) Unmarshal(dAtA []byte) error

type Details

type Details interface{}

Details is a marker interface for job details proto structs.

type ImportDetails

type ImportDetails struct {
	Tables []ImportDetails_Table `protobuf:"bytes,1,rep,name=tables" json:"tables"`
}

func (*ImportDetails) Descriptor

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

func (*ImportDetails) Marshal

func (m *ImportDetails) Marshal() (dAtA []byte, err error)

func (*ImportDetails) MarshalTo

func (m *ImportDetails) MarshalTo(dAtA []byte) (int, error)

func (*ImportDetails) ProtoMessage

func (*ImportDetails) ProtoMessage()

func (*ImportDetails) Reset

func (m *ImportDetails) Reset()

func (*ImportDetails) Size

func (m *ImportDetails) Size() (n int)

func (*ImportDetails) String

func (m *ImportDetails) String() string

func (*ImportDetails) Unmarshal

func (m *ImportDetails) Unmarshal(dAtA []byte) error

type ImportDetails_Table

type ImportDetails_Table struct {
	Desc       *cockroach_sql_sqlbase1.TableDescriptor `protobuf:"bytes,1,opt,name=desc" json:"desc,omitempty"`
	URIs       []string                                `protobuf:"bytes,2,rep,name=uris" json:"uris,omitempty"`
	Options    *cockroach_roachpb1.CSVOptions          `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"`
	BackupPath string                                  `protobuf:"bytes,4,opt,name=backup_path,json=backupPath,proto3" json:"backup_path,omitempty"`
}

func (*ImportDetails_Table) Descriptor

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

func (*ImportDetails_Table) Marshal

func (m *ImportDetails_Table) Marshal() (dAtA []byte, err error)

func (*ImportDetails_Table) MarshalTo

func (m *ImportDetails_Table) MarshalTo(dAtA []byte) (int, error)

func (*ImportDetails_Table) ProtoMessage

func (*ImportDetails_Table) ProtoMessage()

func (*ImportDetails_Table) Reset

func (m *ImportDetails_Table) Reset()

func (*ImportDetails_Table) Size

func (m *ImportDetails_Table) Size() (n int)

func (*ImportDetails_Table) String

func (m *ImportDetails_Table) String() string

func (*ImportDetails_Table) Unmarshal

func (m *ImportDetails_Table) Unmarshal(dAtA []byte) error

type InvalidStatusError

type InvalidStatusError struct {
	// contains filtered or unexported fields
}

InvalidStatusError is the error returned when the desired operation is invalid given the job's current status.

func (*InvalidStatusError) Error

func (e *InvalidStatusError) Error() string

type Job

type Job struct {
	Record Record
	// contains filtered or unexported fields
}

Job manages logging the progress of long-running system processes, like backups and restores, to the system.jobs table.

The Record field can be directly modified before Created is called. Updates to the Record field after the job has been created will not be written to the database, however, even when calling e.g. Started or Succeeded.

func (*Job) Canceled

func (j *Job) Canceled(ctx context.Context) error

Canceled sets the status of the tracked job to canceled. It does not directly cancel the job; like job.Paused, it expects the job to call job.Progressed soon, observe a "job is canceled" error, and abort further work.

func (*Job) ClusterID

func (j *Job) ClusterID() uuid.UUID

ClusterID returns the uuid.UUID cluster ID associated with this job.

func (*Job) Created

func (j *Job) Created(ctx context.Context, cancelFn func()) error

Created records the creation of a new job in the system.jobs table and remembers the assigned ID of the job in the Job. The job information is read from the Record field at the time Created is called. If cancelFn is not nil, the Registry will automatically acquire a lease for this job and invoke cancelFn if the lease expires.

func (*Job) DB

func (j *Job) DB() *client.DB

DB returns the *client.DB associated with this job.

func (*Job) Failed

func (j *Job) Failed(ctx context.Context, err error)

Failed marks the tracked job as having failed with the given error. Any errors encountered while updating the jobs table are logged but not returned, under the assumption that the the caller is already handling a more important error and doesn't care about this one.

func (*Job) FinishedWith

func (j *Job) FinishedWith(ctx context.Context, err error) error

FinishedWith is a shortcut for automatically calling Succeeded or Failed based on the presence of err. Any non-nil error is taken to mean that the job has failed. The error returned, if any, is serious enough that it should not be logged and ignored.

TODO(benesch): Fix this wonky API. Once schema change leases are managed by this package, replace Succeeded, Failed, and FinishedWith with an API like

func (r *Registry) RunJob(setupFn func() Details, workFn func() error) (result, error)

where RunJob handles writing to system.jobs automatically.

func (*Job) Gossip

func (j *Job) Gossip() *gossip.Gossip

Gossip returns the *gossip.Gossip associated with this job.

func (*Job) ID

func (j *Job) ID() *int64

ID returns the ID of the job that this Job is currently tracking. This will be nil if Created has not yet been called.

func (*Job) NodeID

func (j *Job) NodeID() roachpb.NodeID

NodeID returns the roachpb.NodeID associated with this job.

func (*Job) Paused

func (j *Job) Paused(ctx context.Context) error

Paused sets the status of the tracked job to paused. It does not directly pause the job; instead, it expects the job to call job.Progressed soon, observe a "job is paused" error, and abort further work.

func (*Job) Payload

func (j *Job) Payload() Payload

Payload returns the most recently sent Payload for this Job. Will return an empty Payload until Created() is called on a new Job.

func (*Job) Progressed

func (j *Job) Progressed(
	ctx context.Context, fractionCompleted float32, progressedFn ProgressedFn,
) error

Progressed updates the progress of the tracked job to fractionCompleted. A fractionCompleted that is less than the currently-recorded fractionCompleted will be silently ignored. If progressedFn is non-nil, it will be invoked with a pointer to the job's details to allow for modifications to the details before the job is saved. If no such modifications are required, pass Noop instead of nil for readability.

func (*Job) Resumed

func (j *Job) Resumed(ctx context.Context) error

Resumed sets the status of the tracked job to running iff the job is currently paused. It does not directly resume the job; rather, it expires the job's lease so that a Registry adoption loop detects it and resumes it.

func (*Job) SetDetails

func (j *Job) SetDetails(ctx context.Context, details interface{}) error

SetDetails sets the details field of the currently running tracked job.

func (*Job) Started

func (j *Job) Started(ctx context.Context) error

Started marks the tracked job as started.

func (*Job) Succeeded

func (j *Job) Succeeded(ctx context.Context) error

Succeeded marks the tracked job as having succeeded and sets its fraction completed to 1.0.

func (*Job) WithTxn

func (j *Job) WithTxn(txn *client.Txn) *Job

WithTxn sets the transaction that this Job will use for its next operation. If the transaction is nil, the Job will create a one-off transaction instead. If you use WithTxn, this Job will no longer be threadsafe.

type Lease

type Lease struct {
	// The ID of the node that holds the lease.
	NodeID github_com_cockroachdb_cockroach_pkg_roachpb.NodeID `` /* 141-byte string literal not displayed */
	// The epoch of the lease holder's node liveness entry.
	Epoch int64 `protobuf:"varint,2,opt,name=epoch,proto3" json:"epoch,omitempty"`
}

func (*Lease) Descriptor

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

func (*Lease) Equal

func (this *Lease) Equal(that interface{}) bool

func (*Lease) Marshal

func (m *Lease) Marshal() (dAtA []byte, err error)

func (*Lease) MarshalTo

func (m *Lease) MarshalTo(dAtA []byte) (int, error)

func (*Lease) ProtoMessage

func (*Lease) ProtoMessage()

func (*Lease) Reset

func (m *Lease) Reset()

func (*Lease) Size

func (m *Lease) Size() (n int)

func (*Lease) String

func (m *Lease) String() string

func (*Lease) Unmarshal

func (m *Lease) Unmarshal(dAtA []byte) error

type Payload

type Payload struct {
	Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
	Username    string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	// For consistency with the SQL timestamp type, which has microsecond
	// precision, we avoid the timestamp.Timestamp WKT, which has nanosecond
	// precision, and use microsecond integers directly.
	StartedMicros     int64                                                 `protobuf:"varint,3,opt,name=started_micros,json=startedMicros,proto3" json:"started_micros,omitempty"`
	FinishedMicros    int64                                                 `protobuf:"varint,4,opt,name=finished_micros,json=finishedMicros,proto3" json:"finished_micros,omitempty"`
	ModifiedMicros    int64                                                 `protobuf:"varint,5,opt,name=modified_micros,json=modifiedMicros,proto3" json:"modified_micros,omitempty"`
	DescriptorIDs     []github_com_cockroachdb_cockroach_pkg_sql_sqlbase.ID `` /* 162-byte string literal not displayed */
	FractionCompleted float32                                               `protobuf:"fixed32,7,opt,name=fraction_completed,json=fractionCompleted,proto3" json:"fraction_completed,omitempty"`
	Error             string                                                `protobuf:"bytes,8,opt,name=error,proto3" json:"error,omitempty"`
	// ID 9 is intentionally reserved for lease information.
	Lease *Lease `protobuf:"bytes,9,opt,name=lease" json:"lease,omitempty"`
	// Types that are valid to be assigned to Details:
	//	*Payload_Backup
	//	*Payload_Restore
	//	*Payload_SchemaChange
	//	*Payload_Import
	Details isPayload_Details `protobuf_oneof:"details"`
}

func UnmarshalPayload

func UnmarshalPayload(datum parser.Datum) (*Payload, error)

UnmarshalPayload unmarshals and returns the Payload encoded in the input datum, which should be a parser.DBytes.

func (*Payload) Descriptor

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

func (*Payload) GetBackup

func (m *Payload) GetBackup() *BackupDetails

func (*Payload) GetDetails

func (m *Payload) GetDetails() isPayload_Details

func (*Payload) GetImport

func (m *Payload) GetImport() *ImportDetails

func (*Payload) GetRestore

func (m *Payload) GetRestore() *RestoreDetails

func (*Payload) GetSchemaChange

func (m *Payload) GetSchemaChange() *SchemaChangeDetails

func (*Payload) Marshal

func (m *Payload) Marshal() (dAtA []byte, err error)

func (*Payload) MarshalTo

func (m *Payload) MarshalTo(dAtA []byte) (int, error)

func (*Payload) ProtoMessage

func (*Payload) ProtoMessage()

func (*Payload) Reset

func (m *Payload) Reset()

func (*Payload) Size

func (m *Payload) Size() (n int)

func (*Payload) String

func (m *Payload) String() string

func (*Payload) Type

func (p *Payload) Type() Type

Type returns the payload's job type.

func (*Payload) Unmarshal

func (m *Payload) Unmarshal(dAtA []byte) error

func (*Payload) UnwrapDetails

func (p *Payload) UnwrapDetails() (Details, error)

UnwrapDetails returns the details object stored within the payload's Details field, discarding the protobuf wrapper struct.

Unlike in WrapPayloadDetails, an unknown details type may simply indicate that the Payload originated on a node aware of more details types, and so the error is returned to the caller.

func (*Payload) XXX_OneofFuncs

func (*Payload) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

type Payload_Backup

type Payload_Backup struct {
	Backup *BackupDetails `protobuf:"bytes,10,opt,name=backup,oneof"`
}

func (*Payload_Backup) MarshalTo

func (m *Payload_Backup) MarshalTo(dAtA []byte) (int, error)

func (*Payload_Backup) Size

func (m *Payload_Backup) Size() (n int)

type Payload_Import

type Payload_Import struct {
	Import *ImportDetails `protobuf:"bytes,13,opt,name=import,oneof"`
}

func (*Payload_Import) MarshalTo

func (m *Payload_Import) MarshalTo(dAtA []byte) (int, error)

func (*Payload_Import) Size

func (m *Payload_Import) Size() (n int)

type Payload_Restore

type Payload_Restore struct {
	Restore *RestoreDetails `protobuf:"bytes,11,opt,name=restore,oneof"`
}

func (*Payload_Restore) MarshalTo

func (m *Payload_Restore) MarshalTo(dAtA []byte) (int, error)

func (*Payload_Restore) Size

func (m *Payload_Restore) Size() (n int)

type Payload_SchemaChange

type Payload_SchemaChange struct {
	SchemaChange *SchemaChangeDetails `protobuf:"bytes,12,opt,name=schemaChange,oneof"`
}

func (*Payload_SchemaChange) MarshalTo

func (m *Payload_SchemaChange) MarshalTo(dAtA []byte) (int, error)

func (*Payload_SchemaChange) Size

func (m *Payload_SchemaChange) Size() (n int)

type ProgressedFn

type ProgressedFn func(ctx context.Context, details interface{})

ProgressedFn is a callback that allows arbitrary modifications to a job's details when updating its progress.

var Noop ProgressedFn

Noop is a nil ProgressedFn.

type Record

type Record struct {
	Description   string
	Username      string
	DescriptorIDs sqlbase.IDs
	Details       Details
}

Record stores the job fields that are not automatically managed by Job.

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

Registry creates Jobs and manages their leases and cancelation.

func MakeRegistry

func MakeRegistry(
	clock *hlc.Clock,
	db *client.DB,
	ex sqlutil.InternalExecutor,
	gossip *gossip.Gossip,
	nodeID *base.NodeIDContainer,
	clusterID func() uuid.UUID,
) *Registry

MakeRegistry creates a new Registry.

func (*Registry) LoadJob

func (r *Registry) LoadJob(ctx context.Context, jobID int64) (*Job, error)

LoadJob loads an existing job with the given jobID from the system.jobs table.

func (*Registry) LoadJobWithTxn

func (r *Registry) LoadJobWithTxn(ctx context.Context, jobID int64, txn *client.Txn) (*Job, error)

LoadJobWithTxn does the same as above, but using the transaction passed in the txn argument. Passing a nil transaction is equivalent to calling LoadJob in that a transaction will be automatically created.

func (*Registry) NewJob

func (r *Registry) NewJob(record Record) *Job

NewJob creates a new Job.

func (*Registry) Start

func (r *Registry) Start(
	ctx context.Context,
	stopper *stop.Stopper,
	nl nodeLiveness,
	cancelInterval, adoptInterval time.Duration,
) error

Start polls the current node for liveness failures and cancels all registered jobs if it observes a failure.

type RestoreDetails

type RestoreDetails struct {
	LowWaterMark  []byte                                                                               `protobuf:"bytes,1,opt,name=low_water_mark,json=lowWaterMark,proto3" json:"low_water_mark,omitempty"`
	TableRewrites map[github_com_cockroachdb_cockroach_pkg_sql_sqlbase.ID]*RestoreDetails_TableRewrite `` /* 235-byte string literal not displayed */
	URIs          []string                                                                             `protobuf:"bytes,3,rep,name=uris" json:"uris,omitempty"`
}

func (*RestoreDetails) Descriptor

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

func (*RestoreDetails) Marshal

func (m *RestoreDetails) Marshal() (dAtA []byte, err error)

func (*RestoreDetails) MarshalTo

func (m *RestoreDetails) MarshalTo(dAtA []byte) (int, error)

func (*RestoreDetails) ProtoMessage

func (*RestoreDetails) ProtoMessage()

func (*RestoreDetails) Reset

func (m *RestoreDetails) Reset()

func (*RestoreDetails) Size

func (m *RestoreDetails) Size() (n int)

func (*RestoreDetails) String

func (m *RestoreDetails) String() string

func (*RestoreDetails) Unmarshal

func (m *RestoreDetails) Unmarshal(dAtA []byte) error

type RestoreDetails_TableRewrite

type RestoreDetails_TableRewrite struct {
	TableID  github_com_cockroachdb_cockroach_pkg_sql_sqlbase.ID `` /* 144-byte string literal not displayed */
	ParentID github_com_cockroachdb_cockroach_pkg_sql_sqlbase.ID `` /* 147-byte string literal not displayed */
}

func (*RestoreDetails_TableRewrite) Descriptor

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

func (*RestoreDetails_TableRewrite) Marshal

func (m *RestoreDetails_TableRewrite) Marshal() (dAtA []byte, err error)

func (*RestoreDetails_TableRewrite) MarshalTo

func (m *RestoreDetails_TableRewrite) MarshalTo(dAtA []byte) (int, error)

func (*RestoreDetails_TableRewrite) ProtoMessage

func (*RestoreDetails_TableRewrite) ProtoMessage()

func (*RestoreDetails_TableRewrite) Reset

func (m *RestoreDetails_TableRewrite) Reset()

func (*RestoreDetails_TableRewrite) Size

func (m *RestoreDetails_TableRewrite) Size() (n int)

func (*RestoreDetails_TableRewrite) String

func (m *RestoreDetails_TableRewrite) String() string

func (*RestoreDetails_TableRewrite) Unmarshal

func (m *RestoreDetails_TableRewrite) Unmarshal(dAtA []byte) error

type ResumeSpanList

type ResumeSpanList struct {
	ResumeSpans []cockroach_roachpb1.Span `protobuf:"bytes,1,rep,name=resume_spans,json=resumeSpans" json:"resume_spans"`
}

func (*ResumeSpanList) Descriptor

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

func (*ResumeSpanList) Marshal

func (m *ResumeSpanList) Marshal() (dAtA []byte, err error)

func (*ResumeSpanList) MarshalTo

func (m *ResumeSpanList) MarshalTo(dAtA []byte) (int, error)

func (*ResumeSpanList) ProtoMessage

func (*ResumeSpanList) ProtoMessage()

func (*ResumeSpanList) Reset

func (m *ResumeSpanList) Reset()

func (*ResumeSpanList) Size

func (m *ResumeSpanList) Size() (n int)

func (*ResumeSpanList) String

func (m *ResumeSpanList) String() string

func (*ResumeSpanList) Unmarshal

func (m *ResumeSpanList) Unmarshal(dAtA []byte) error

type SchemaChangeDetails

type SchemaChangeDetails struct {
	ReadAsOf cockroach_util_hlc.Timestamp `protobuf:"bytes,1,opt,name=read_as_of,json=readAsOf" json:"read_as_of"`
	// A schema change can involve running multiple processors backfilling
	// or deleting data. They occasionally checkpoint Spans so that the
	// processing can resume in the event of a node failure. The spans are
	// non-overlapping contiguous areas of the KV space that still need to
	// be processed. The index represents the index of a mutation in a
	// mutation list containing mutations for the same mutationID.
	ResumeSpanList []ResumeSpanList `protobuf:"bytes,2,rep,name=resume_span_list,json=resumeSpanList" json:"resume_span_list"`
}

func (*SchemaChangeDetails) Descriptor

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

func (*SchemaChangeDetails) Marshal

func (m *SchemaChangeDetails) Marshal() (dAtA []byte, err error)

func (*SchemaChangeDetails) MarshalTo

func (m *SchemaChangeDetails) MarshalTo(dAtA []byte) (int, error)

func (*SchemaChangeDetails) ProtoMessage

func (*SchemaChangeDetails) ProtoMessage()

func (*SchemaChangeDetails) Reset

func (m *SchemaChangeDetails) Reset()

func (*SchemaChangeDetails) Size

func (m *SchemaChangeDetails) Size() (n int)

func (*SchemaChangeDetails) String

func (m *SchemaChangeDetails) String() string

func (*SchemaChangeDetails) Unmarshal

func (m *SchemaChangeDetails) Unmarshal(dAtA []byte) error

type Status

type Status string

Status represents the status of a job in the system.jobs table.

const (
	// StatusPending is for jobs that have been created but on which work has
	// not yet started.
	StatusPending Status = "pending"
	// StatusRunning is for jobs that are currently in progress.
	StatusRunning Status = "running"
	// StatusPaused is for jobs that are not currently performing work, but have
	// saved their state and can be resumed by the user later.
	StatusPaused Status = "paused"
	// StatusFailed is for jobs that failed.
	StatusFailed Status = "failed"
	// StatusSucceeded is for jobs that have successfully completed.
	StatusSucceeded Status = "succeeded"
	// StatusCanceled is for jobs that were explicitly canceled by the user and
	// cannot be resumed.
	StatusCanceled Status = "canceled"
)

func RunAndWaitForTerminalState

func RunAndWaitForTerminalState(
	ctx context.Context, sqlDB *gosql.DB, execFn func(context.Context) error,
) (int64, Status, error)

RunAndWaitForTerminalState runs a closure and potentially tracks its progress using the system.jobs table.

If the closure returns before a jobs entry is created, the closure's error is passed back with no job information. Otherwise, the first jobs entry created after the closure starts is polled until it enters a terminal state and that job's id, status, and error are returned.

TODO(dan): Return a *Job instead of just the id and status.

TODO(dan): This assumes that the next entry to the jobs table was made by this closure, but this assumption is quite racy. See if we can do something better.

func (Status) Terminal

func (s Status) Terminal() bool

Terminal returns whether this status represents a "terminal" state: a state after which the job should never be updated again.

type Type

type Type int32
const (
	TypeUnspecified  Type = 0
	TypeBackup       Type = 1
	TypeRestore      Type = 2
	TypeSchemaChange Type = 3
	TypeImport       Type = 4
)

func (Type) EnumDescriptor

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

func (Type) String

func (t Type) String() string

Jump to

Keyboard shortcuts

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