Documentation ¶
Overview ¶
Package pubsub implements utility functions for publishing various Run events to Cloud PubSub.
Index ¶
- Variables
- type PublishRunEndedTask
- func (*PublishRunEndedTask) Descriptor() ([]byte, []int)deprecated
- func (x *PublishRunEndedTask) GetEversion() int64
- func (x *PublishRunEndedTask) GetLuciProject() string
- func (x *PublishRunEndedTask) GetPublicId() string
- func (x *PublishRunEndedTask) GetStatus() run.Status
- func (*PublishRunEndedTask) ProtoMessage()
- func (x *PublishRunEndedTask) ProtoReflect() protoreflect.Message
- func (x *PublishRunEndedTask) Reset()
- func (x *PublishRunEndedTask) String() string
- func (m *PublishRunEndedTask) Validate() error
- func (m *PublishRunEndedTask) ValidateAll() error
- type PublishRunEndedTaskMultiError
- type PublishRunEndedTaskValidationError
- func (e PublishRunEndedTaskValidationError) Cause() error
- func (e PublishRunEndedTaskValidationError) Error() string
- func (e PublishRunEndedTaskValidationError) ErrorName() string
- func (e PublishRunEndedTaskValidationError) Field() string
- func (e PublishRunEndedTaskValidationError) Key() bool
- func (e PublishRunEndedTaskValidationError) Reason() string
- type Publisher
Constants ¶
This section is empty.
Variables ¶
var File_go_chromium_org_luci_cv_internal_run_pubsub_tasks_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type PublishRunEndedTask ¶
type PublishRunEndedTask struct { PublicId string `protobuf:"bytes,1,opt,name=public_id,json=publicId,proto3" json:"public_id,omitempty"` LuciProject string `protobuf:"bytes,2,opt,name=luci_project,json=luciProject,proto3" json:"luci_project,omitempty"` Status run.Status `protobuf:"varint,3,opt,name=status,proto3,enum=cv.internal.run.Status" json:"status,omitempty"` Eversion int64 `protobuf:"varint,4,opt,name=eversion,proto3" json:"eversion,omitempty"` // contains filtered or unexported fields }
PublishRunEndedTask publishes a PubSub message for a CV Run ended event.
func (*PublishRunEndedTask) Descriptor
deprecated
func (*PublishRunEndedTask) Descriptor() ([]byte, []int)
Deprecated: Use PublishRunEndedTask.ProtoReflect.Descriptor instead.
func (*PublishRunEndedTask) GetEversion ¶
func (x *PublishRunEndedTask) GetEversion() int64
func (*PublishRunEndedTask) GetLuciProject ¶
func (x *PublishRunEndedTask) GetLuciProject() string
func (*PublishRunEndedTask) GetPublicId ¶
func (x *PublishRunEndedTask) GetPublicId() string
func (*PublishRunEndedTask) GetStatus ¶
func (x *PublishRunEndedTask) GetStatus() run.Status
func (*PublishRunEndedTask) ProtoMessage ¶
func (*PublishRunEndedTask) ProtoMessage()
func (*PublishRunEndedTask) ProtoReflect ¶
func (x *PublishRunEndedTask) ProtoReflect() protoreflect.Message
func (*PublishRunEndedTask) Reset ¶
func (x *PublishRunEndedTask) Reset()
func (*PublishRunEndedTask) String ¶
func (x *PublishRunEndedTask) String() string
func (*PublishRunEndedTask) Validate ¶
func (m *PublishRunEndedTask) Validate() error
Validate checks the field values on PublishRunEndedTask with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*PublishRunEndedTask) ValidateAll ¶
func (m *PublishRunEndedTask) ValidateAll() error
ValidateAll checks the field values on PublishRunEndedTask with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in PublishRunEndedTaskMultiError, or nil if none found.
type PublishRunEndedTaskMultiError ¶
type PublishRunEndedTaskMultiError []error
PublishRunEndedTaskMultiError is an error wrapping multiple validation errors returned by PublishRunEndedTask.ValidateAll() if the designated constraints aren't met.
func (PublishRunEndedTaskMultiError) AllErrors ¶
func (m PublishRunEndedTaskMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (PublishRunEndedTaskMultiError) Error ¶
func (m PublishRunEndedTaskMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type PublishRunEndedTaskValidationError ¶
type PublishRunEndedTaskValidationError struct {
// contains filtered or unexported fields
}
PublishRunEndedTaskValidationError is the validation error returned by PublishRunEndedTask.Validate if the designated constraints aren't met.
func (PublishRunEndedTaskValidationError) Cause ¶
func (e PublishRunEndedTaskValidationError) Cause() error
Cause function returns cause value.
func (PublishRunEndedTaskValidationError) Error ¶
func (e PublishRunEndedTaskValidationError) Error() string
Error satisfies the builtin error interface
func (PublishRunEndedTaskValidationError) ErrorName ¶
func (e PublishRunEndedTaskValidationError) ErrorName() string
ErrorName returns error name.
func (PublishRunEndedTaskValidationError) Field ¶
func (e PublishRunEndedTaskValidationError) Field() string
Field function returns field value.
func (PublishRunEndedTaskValidationError) Key ¶
func (e PublishRunEndedTaskValidationError) Key() bool
Key function returns key value.
func (PublishRunEndedTaskValidationError) Reason ¶
func (e PublishRunEndedTaskValidationError) Reason() string
Reason function returns reason value.
type Publisher ¶
type Publisher struct {
// contains filtered or unexported fields
}
Publisher publishes a message for various run events into Cloud PubSub topics.
func NewPublisher ¶
func NewPublisher(tqd *tq.Dispatcher, env *common.Env) *Publisher
NewPublisher creates a new Publisher and registers TaskClasses for run events.