rpc

package
v0.0.0-...-13f153f Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: BSD-3-Clause Imports: 28 Imported by: 0

Documentation

Overview

Package rpc is a generated twirp stub package. This code was generated with github.com/twitchtv/twirp/protoc-gen-twirp v7.1.0.

It is generated from these files:

status.proto

Index

Constants

View Source
const StatusServicePathPrefix = "/twirp/status.StatusService/"

StatusServicePathPrefix is a convenience constant that could used to identify URL paths. Should be used with caution, it only matches routes generated by Twirp Go clients, that add a "/twirp" prefix by default, and use CamelCase service and method names. More info: https://twitchtv.github.io/twirp/docs/routing.html

Variables

View Source
var File_status_proto protoreflect.FileDescriptor

Functions

func NewStatusServer

func NewStatusServer(
	iCache incremental.IncrementalCache,
	taskDb db.RemoteDB,
	capacityClient capacity.CapacityClient,
	getAutorollerStatuses func() *GetAutorollerStatusesResponse,
	getRepo func(string) (string, string, error),
	maxCommitsToLoad int,
	defaultCommitsToLoad int,
	podID string) http.Handler

NewStatusServer creates and returns a Twirp HTTP Server.

func WriteError

func WriteError(resp http.ResponseWriter, err error)

WriteError writes an HTTP response with a valid Twirp error format (code, msg, meta). Useful outside of the Twirp server (e.g. http middleware), but does not trigger hooks. If err is not a twirp.Error, it will get wrapped with twirp.InternalErrorWith(err)

Types

type AddCommentRequest

type AddCommentRequest struct {
	Repo string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"`
	// Only one of commit, task_spec, and task_id will be set, based on if the comment is for a
	// commit, task spec, or task. Oneof not used since TypeScript doesn't support it.
	Commit        string `protobuf:"bytes,2,opt,name=commit,proto3" json:"commit,omitempty"`
	TaskSpec      string `protobuf:"bytes,3,opt,name=task_spec,json=taskSpec,proto3" json:"task_spec,omitempty"`
	TaskId        string `protobuf:"bytes,4,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
	Message       string `protobuf:"bytes,5,opt,name=message,proto3" json:"message,omitempty"`
	Flaky         bool   `protobuf:"varint,6,opt,name=flaky,proto3" json:"flaky,omitempty"` // Only valid when task_spec is set.
	IgnoreFailure bool   `protobuf:"varint,7,opt,name=ignore_failure,json=ignoreFailure,proto3" json:"ignore_failure,omitempty"`
	// contains filtered or unexported fields
}

Request for adding a comment. this, along with timestamp, represent the comment in the DB.

func (*AddCommentRequest) Descriptor deprecated

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

Deprecated: Use AddCommentRequest.ProtoReflect.Descriptor instead.

func (*AddCommentRequest) GetCommit

func (x *AddCommentRequest) GetCommit() string

func (*AddCommentRequest) GetFlaky

func (x *AddCommentRequest) GetFlaky() bool

func (*AddCommentRequest) GetIgnoreFailure

func (x *AddCommentRequest) GetIgnoreFailure() bool

func (*AddCommentRequest) GetMessage

func (x *AddCommentRequest) GetMessage() string

func (*AddCommentRequest) GetRepo

func (x *AddCommentRequest) GetRepo() string

func (*AddCommentRequest) GetTaskId

func (x *AddCommentRequest) GetTaskId() string

func (*AddCommentRequest) GetTaskSpec

func (x *AddCommentRequest) GetTaskSpec() string

func (*AddCommentRequest) ProtoMessage

func (*AddCommentRequest) ProtoMessage()

func (*AddCommentRequest) ProtoReflect

func (x *AddCommentRequest) ProtoReflect() protoreflect.Message

func (*AddCommentRequest) Reset

func (x *AddCommentRequest) Reset()

func (*AddCommentRequest) String

func (x *AddCommentRequest) String() string

type AddCommentResponse

type AddCommentResponse struct {

	// We provide the timestamp used for the comment so the UI can immediately update, rather than
	// waiting on polling to pick up the new comment.
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

Response to AddComment, only success/failure needs to be conveyed.

func (*AddCommentResponse) Descriptor deprecated

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

Deprecated: Use AddCommentResponse.ProtoReflect.Descriptor instead.

func (*AddCommentResponse) GetTimestamp

func (x *AddCommentResponse) GetTimestamp() *timestamppb.Timestamp

func (*AddCommentResponse) ProtoMessage

func (*AddCommentResponse) ProtoMessage()

func (*AddCommentResponse) ProtoReflect

func (x *AddCommentResponse) ProtoReflect() protoreflect.Message

func (*AddCommentResponse) Reset

func (x *AddCommentResponse) Reset()

func (*AddCommentResponse) String

func (x *AddCommentResponse) String() string

type AutorollerStatus

type AutorollerStatus struct {
	Name           string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	CurrentRollRev string `protobuf:"bytes,2,opt,name=current_roll_rev,json=currentRollRev,proto3" json:"current_roll_rev,omitempty"`
	LastRollRev    string `protobuf:"bytes,3,opt,name=last_roll_rev,json=lastRollRev,proto3" json:"last_roll_rev,omitempty"`
	Mode           string `protobuf:"bytes,4,opt,name=mode,proto3" json:"mode,omitempty"`
	NumFailed      int32  `protobuf:"varint,5,opt,name=num_failed,json=numFailed,proto3" json:"num_failed,omitempty"`
	NumBehind      int32  `protobuf:"varint,6,opt,name=num_behind,json=numBehind,proto3" json:"num_behind,omitempty"`
	Url            string `protobuf:"bytes,7,opt,name=url,proto3" json:"url,omitempty"`
	// contains filtered or unexported fields
}

func (*AutorollerStatus) Descriptor deprecated

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

Deprecated: Use AutorollerStatus.ProtoReflect.Descriptor instead.

func (*AutorollerStatus) GetCurrentRollRev

func (x *AutorollerStatus) GetCurrentRollRev() string

func (*AutorollerStatus) GetLastRollRev

func (x *AutorollerStatus) GetLastRollRev() string

func (*AutorollerStatus) GetMode

func (x *AutorollerStatus) GetMode() string

func (*AutorollerStatus) GetName

func (x *AutorollerStatus) GetName() string

func (*AutorollerStatus) GetNumBehind

func (x *AutorollerStatus) GetNumBehind() int32

func (*AutorollerStatus) GetNumFailed

func (x *AutorollerStatus) GetNumFailed() int32

func (*AutorollerStatus) GetUrl

func (x *AutorollerStatus) GetUrl() string

func (*AutorollerStatus) ProtoMessage

func (*AutorollerStatus) ProtoMessage()

func (*AutorollerStatus) ProtoReflect

func (x *AutorollerStatus) ProtoReflect() protoreflect.Message

func (*AutorollerStatus) Reset

func (x *AutorollerStatus) Reset()

func (*AutorollerStatus) String

func (x *AutorollerStatus) String() string

type BotSet

type BotSet struct {
	Dimensions  map[string]string `` /* 161-byte string literal not displayed */
	BotCount    int32             `protobuf:"varint,2,opt,name=bot_count,json=botCount,proto3" json:"bot_count,omitempty"`
	CqTasks     int32             `protobuf:"varint,3,opt,name=cq_tasks,json=cqTasks,proto3" json:"cq_tasks,omitempty"`
	MsPerCq     int64             `protobuf:"varint,4,opt,name=ms_per_cq,json=msPerCq,proto3" json:"ms_per_cq,omitempty"`
	TotalTasks  int32             `protobuf:"varint,5,opt,name=total_tasks,json=totalTasks,proto3" json:"total_tasks,omitempty"`
	MsPerCommit int64             `protobuf:"varint,6,opt,name=ms_per_commit,json=msPerCommit,proto3" json:"ms_per_commit,omitempty"`
	// contains filtered or unexported fields
}

func (*BotSet) Descriptor deprecated

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

Deprecated: Use BotSet.ProtoReflect.Descriptor instead.

func (*BotSet) GetBotCount

func (x *BotSet) GetBotCount() int32

func (*BotSet) GetCqTasks

func (x *BotSet) GetCqTasks() int32

func (*BotSet) GetDimensions

func (x *BotSet) GetDimensions() map[string]string

func (*BotSet) GetMsPerCommit

func (x *BotSet) GetMsPerCommit() int64

func (*BotSet) GetMsPerCq

func (x *BotSet) GetMsPerCq() int64

func (*BotSet) GetTotalTasks

func (x *BotSet) GetTotalTasks() int32

func (*BotSet) ProtoMessage

func (*BotSet) ProtoMessage()

func (*BotSet) ProtoReflect

func (x *BotSet) ProtoReflect() protoreflect.Message

func (*BotSet) Reset

func (x *BotSet) Reset()

func (*BotSet) String

func (x *BotSet) String() string

type Branch

type Branch struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Head string `protobuf:"bytes,2,opt,name=head,proto3" json:"head,omitempty"`
	// contains filtered or unexported fields
}

Branch names and their associated HEAD commit hash.

func (*Branch) Descriptor deprecated

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

Deprecated: Use Branch.ProtoReflect.Descriptor instead.

func (*Branch) GetHead

func (x *Branch) GetHead() string

func (*Branch) GetName

func (x *Branch) GetName() string

func (*Branch) ProtoMessage

func (*Branch) ProtoMessage()

func (*Branch) ProtoReflect

func (x *Branch) ProtoReflect() protoreflect.Message

func (*Branch) Reset

func (x *Branch) Reset()

func (*Branch) String

func (x *Branch) String() string

type Comment

type Comment struct {
	Id            string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Repo          string                 `protobuf:"bytes,2,opt,name=repo,proto3" json:"repo,omitempty"`
	Timestamp     *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	User          string                 `protobuf:"bytes,4,opt,name=user,proto3" json:"user,omitempty"`
	Message       string                 `protobuf:"bytes,5,opt,name=message,proto3" json:"message,omitempty"`
	Deleted       bool                   `protobuf:"varint,6,opt,name=deleted,proto3" json:"deleted,omitempty"`
	IgnoreFailure bool                   `protobuf:"varint,7,opt,name=ignore_failure,json=ignoreFailure,proto3" json:"ignore_failure,omitempty"` // Only for commit and taskSpec comments.
	Flaky         bool                   `protobuf:"varint,8,opt,name=flaky,proto3" json:"flaky,omitempty"`                                      // Only for taskSpec comments.
	TaskSpecName  string                 `protobuf:"bytes,9,opt,name=task_spec_name,json=taskSpecName,proto3" json:"task_spec_name,omitempty"`   // Only for task and taskSpec comments
	TaskId        string                 `protobuf:"bytes,10,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`                      // Only for task comments
	Commit        string                 `protobuf:"bytes,11,opt,name=commit,proto3" json:"commit,omitempty"`                                    // Only for commit comments.
	// contains filtered or unexported fields
}

Represents one of 3 types of human-written comment submitted on Status: 1) Specific task comment 2) Entire commit comment 3) Entire task spec comment

func (*Comment) Descriptor deprecated

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

Deprecated: Use Comment.ProtoReflect.Descriptor instead.

func (*Comment) GetCommit

func (x *Comment) GetCommit() string

func (*Comment) GetDeleted

func (x *Comment) GetDeleted() bool

func (*Comment) GetFlaky

func (x *Comment) GetFlaky() bool

func (*Comment) GetId

func (x *Comment) GetId() string

func (*Comment) GetIgnoreFailure

func (x *Comment) GetIgnoreFailure() bool

func (*Comment) GetMessage

func (x *Comment) GetMessage() string

func (*Comment) GetRepo

func (x *Comment) GetRepo() string

func (*Comment) GetTaskId

func (x *Comment) GetTaskId() string

func (*Comment) GetTaskSpecName

func (x *Comment) GetTaskSpecName() string

func (*Comment) GetTimestamp

func (x *Comment) GetTimestamp() *timestamppb.Timestamp

func (*Comment) GetUser

func (x *Comment) GetUser() string

func (*Comment) ProtoMessage

func (*Comment) ProtoMessage()

func (*Comment) ProtoReflect

func (x *Comment) ProtoReflect() protoreflect.Message

func (*Comment) Reset

func (x *Comment) Reset()

func (*Comment) String

func (x *Comment) String() string

type DeleteCommentRequest

type DeleteCommentRequest struct {
	Repo      string                 `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"`
	Commit    string                 `protobuf:"bytes,2,opt,name=commit,proto3" json:"commit,omitempty"`
	TaskSpec  string                 `protobuf:"bytes,3,opt,name=task_spec,json=taskSpec,proto3" json:"task_spec,omitempty"`
	TaskId    string                 `protobuf:"bytes,4,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

Request for deleting a comment. All fields used to identify the comment in the DB.

func (*DeleteCommentRequest) Descriptor deprecated

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

Deprecated: Use DeleteCommentRequest.ProtoReflect.Descriptor instead.

func (*DeleteCommentRequest) GetCommit

func (x *DeleteCommentRequest) GetCommit() string

func (*DeleteCommentRequest) GetRepo

func (x *DeleteCommentRequest) GetRepo() string

func (*DeleteCommentRequest) GetTaskId

func (x *DeleteCommentRequest) GetTaskId() string

func (*DeleteCommentRequest) GetTaskSpec

func (x *DeleteCommentRequest) GetTaskSpec() string

func (*DeleteCommentRequest) GetTimestamp

func (x *DeleteCommentRequest) GetTimestamp() *timestamppb.Timestamp

func (*DeleteCommentRequest) ProtoMessage

func (*DeleteCommentRequest) ProtoMessage()

func (*DeleteCommentRequest) ProtoReflect

func (x *DeleteCommentRequest) ProtoReflect() protoreflect.Message

func (*DeleteCommentRequest) Reset

func (x *DeleteCommentRequest) Reset()

func (*DeleteCommentRequest) String

func (x *DeleteCommentRequest) String() string

type DeleteCommentResponse

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

Empty, valid response to DeleteComment, only success/failure needs to be conveyed.

func (*DeleteCommentResponse) Descriptor deprecated

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

Deprecated: Use DeleteCommentResponse.ProtoReflect.Descriptor instead.

func (*DeleteCommentResponse) ProtoMessage

func (*DeleteCommentResponse) ProtoMessage()

func (*DeleteCommentResponse) ProtoReflect

func (x *DeleteCommentResponse) ProtoReflect() protoreflect.Message

func (*DeleteCommentResponse) Reset

func (x *DeleteCommentResponse) Reset()

func (*DeleteCommentResponse) String

func (x *DeleteCommentResponse) String() string

type GetAutorollerStatusesRequest

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

Empty, no parameters needed to ask for latest autoroller status info.

func (*GetAutorollerStatusesRequest) Descriptor deprecated

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

Deprecated: Use GetAutorollerStatusesRequest.ProtoReflect.Descriptor instead.

func (*GetAutorollerStatusesRequest) ProtoMessage

func (*GetAutorollerStatusesRequest) ProtoMessage()

func (*GetAutorollerStatusesRequest) ProtoReflect

func (*GetAutorollerStatusesRequest) Reset

func (x *GetAutorollerStatusesRequest) Reset()

func (*GetAutorollerStatusesRequest) String

type GetAutorollerStatusesResponse

type GetAutorollerStatusesResponse struct {
	Rollers []*AutorollerStatus `protobuf:"bytes,1,rep,name=rollers,proto3" json:"rollers,omitempty"`
	// contains filtered or unexported fields
}

func (*GetAutorollerStatusesResponse) Descriptor deprecated

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

Deprecated: Use GetAutorollerStatusesResponse.ProtoReflect.Descriptor instead.

func (*GetAutorollerStatusesResponse) GetRollers

func (*GetAutorollerStatusesResponse) ProtoMessage

func (*GetAutorollerStatusesResponse) ProtoMessage()

func (*GetAutorollerStatusesResponse) ProtoReflect

func (*GetAutorollerStatusesResponse) Reset

func (x *GetAutorollerStatusesResponse) Reset()

func (*GetAutorollerStatusesResponse) String

type GetBotUsageRequest

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

Empty, no parameters needed to ask for latest bot usage data.

func (*GetBotUsageRequest) Descriptor deprecated

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

Deprecated: Use GetBotUsageRequest.ProtoReflect.Descriptor instead.

func (*GetBotUsageRequest) ProtoMessage

func (*GetBotUsageRequest) ProtoMessage()

func (*GetBotUsageRequest) ProtoReflect

func (x *GetBotUsageRequest) ProtoReflect() protoreflect.Message

func (*GetBotUsageRequest) Reset

func (x *GetBotUsageRequest) Reset()

func (*GetBotUsageRequest) String

func (x *GetBotUsageRequest) String() string

type GetBotUsageResponse

type GetBotUsageResponse struct {
	BotSets []*BotSet `protobuf:"bytes,1,rep,name=bot_sets,json=botSets,proto3" json:"bot_sets,omitempty"`
	// contains filtered or unexported fields
}

Machine/device types, with associated tasks that run on them and data about those tasks.

func (*GetBotUsageResponse) Descriptor deprecated

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

Deprecated: Use GetBotUsageResponse.ProtoReflect.Descriptor instead.

func (*GetBotUsageResponse) GetBotSets

func (x *GetBotUsageResponse) GetBotSets() []*BotSet

func (*GetBotUsageResponse) ProtoMessage

func (*GetBotUsageResponse) ProtoMessage()

func (*GetBotUsageResponse) ProtoReflect

func (x *GetBotUsageResponse) ProtoReflect() protoreflect.Message

func (*GetBotUsageResponse) Reset

func (x *GetBotUsageResponse) Reset()

func (*GetBotUsageResponse) String

func (x *GetBotUsageResponse) String() string

type GetIncrementalCommitsRequest

type GetIncrementalCommitsRequest struct {
	From     *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`
	To       *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"`
	N        int64                  `protobuf:"varint,3,opt,name=n,proto3" json:"n,omitempty"`
	Pod      string                 `protobuf:"bytes,4,opt,name=pod,proto3" json:"pod,omitempty"`
	RepoPath string                 `protobuf:"bytes,5,opt,name=repo_path,json=repoPath,proto3" json:"repo_path,omitempty"`
	// contains filtered or unexported fields
}

Request for updated commit/task/comment/branch/etc data.

func (*GetIncrementalCommitsRequest) Descriptor deprecated

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

Deprecated: Use GetIncrementalCommitsRequest.ProtoReflect.Descriptor instead.

func (*GetIncrementalCommitsRequest) GetFrom

func (*GetIncrementalCommitsRequest) GetN

func (*GetIncrementalCommitsRequest) GetPod

func (*GetIncrementalCommitsRequest) GetRepoPath

func (x *GetIncrementalCommitsRequest) GetRepoPath() string

func (*GetIncrementalCommitsRequest) GetTo

func (*GetIncrementalCommitsRequest) ProtoMessage

func (*GetIncrementalCommitsRequest) ProtoMessage()

func (*GetIncrementalCommitsRequest) ProtoReflect

func (*GetIncrementalCommitsRequest) Reset

func (x *GetIncrementalCommitsRequest) Reset()

func (*GetIncrementalCommitsRequest) String

type GetIncrementalCommitsResponse

type GetIncrementalCommitsResponse struct {
	Metadata *ResponseMetadata  `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
	Update   *IncrementalUpdate `protobuf:"bytes,2,opt,name=update,proto3" json:"update,omitempty"`
	// contains filtered or unexported fields
}

Response containing recent commit/task/comment/branch/etc data.

func ConvertUpdate

func ConvertUpdate(u *incremental.Update, podID string) *GetIncrementalCommitsResponse

ConvertUpdate converts an incremental.Update and Pod Id to a struct generated from a .proto, with matching clientside TS definition.

func (*GetIncrementalCommitsResponse) Descriptor deprecated

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

Deprecated: Use GetIncrementalCommitsResponse.ProtoReflect.Descriptor instead.

func (*GetIncrementalCommitsResponse) GetMetadata

func (*GetIncrementalCommitsResponse) GetUpdate

func (*GetIncrementalCommitsResponse) ProtoMessage

func (*GetIncrementalCommitsResponse) ProtoMessage()

func (*GetIncrementalCommitsResponse) ProtoReflect

func (*GetIncrementalCommitsResponse) Reset

func (x *GetIncrementalCommitsResponse) Reset()

func (*GetIncrementalCommitsResponse) String

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

HTTPClient is the interface used by generated clients to send HTTP requests. It is fulfilled by *(net/http).Client, which is sufficient for most users. Users can provide their own implementation for special retry policies.

HTTPClient implementations should not follow redirects. Redirects are automatically disabled if *(net/http).Client is passed to client constructors. See the withoutRedirects function in this file for more details.

type IncrementalUpdate

type IncrementalUpdate struct {
	Commits     []*LongCommit `protobuf:"bytes,1,rep,name=commits,proto3" json:"commits,omitempty"`
	BranchHeads []*Branch     `protobuf:"bytes,2,rep,name=branch_heads,json=branchHeads,proto3" json:"branch_heads,omitempty"`
	Tasks       []*Task       `protobuf:"bytes,3,rep,name=tasks,proto3" json:"tasks,omitempty"`
	Comments    []*Comment    `protobuf:"bytes,4,rep,name=comments,proto3" json:"comments,omitempty"`
	// contains filtered or unexported fields
}

The (possible incremental) data comprising Status's table of commits and their tasks.

func (*IncrementalUpdate) Descriptor deprecated

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

Deprecated: Use IncrementalUpdate.ProtoReflect.Descriptor instead.

func (*IncrementalUpdate) GetBranchHeads

func (x *IncrementalUpdate) GetBranchHeads() []*Branch

func (*IncrementalUpdate) GetComments

func (x *IncrementalUpdate) GetComments() []*Comment

func (*IncrementalUpdate) GetCommits

func (x *IncrementalUpdate) GetCommits() []*LongCommit

func (*IncrementalUpdate) GetTasks

func (x *IncrementalUpdate) GetTasks() []*Task

func (*IncrementalUpdate) ProtoMessage

func (*IncrementalUpdate) ProtoMessage()

func (*IncrementalUpdate) ProtoReflect

func (x *IncrementalUpdate) ProtoReflect() protoreflect.Message

func (*IncrementalUpdate) Reset

func (x *IncrementalUpdate) Reset()

func (*IncrementalUpdate) String

func (x *IncrementalUpdate) String() string

type LongCommit

type LongCommit struct {
	Hash      string                 `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
	Author    string                 `protobuf:"bytes,2,opt,name=author,proto3" json:"author,omitempty"`
	Subject   string                 `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"`
	Parents   []string               `protobuf:"bytes,4,rep,name=parents,proto3" json:"parents,omitempty"`
	Body      string                 `protobuf:"bytes,5,opt,name=body,proto3" json:"body,omitempty"`
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

Represents a single commit in repo.

func (*LongCommit) Descriptor deprecated

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

Deprecated: Use LongCommit.ProtoReflect.Descriptor instead.

func (*LongCommit) GetAuthor

func (x *LongCommit) GetAuthor() string

func (*LongCommit) GetBody

func (x *LongCommit) GetBody() string

func (*LongCommit) GetHash

func (x *LongCommit) GetHash() string

func (*LongCommit) GetParents

func (x *LongCommit) GetParents() []string

func (*LongCommit) GetSubject

func (x *LongCommit) GetSubject() string

func (*LongCommit) GetTimestamp

func (x *LongCommit) GetTimestamp() *timestamppb.Timestamp

func (*LongCommit) ProtoMessage

func (*LongCommit) ProtoMessage()

func (*LongCommit) ProtoReflect

func (x *LongCommit) ProtoReflect() protoreflect.Message

func (*LongCommit) Reset

func (x *LongCommit) Reset()

func (*LongCommit) String

func (x *LongCommit) String() string

type ResponseMetadata

type ResponseMetadata struct {
	StartOver bool                   `protobuf:"varint,1,opt,name=start_over,json=startOver,proto3" json:"start_over,omitempty"`
	Pod       string                 `protobuf:"bytes,2,opt,name=pod,proto3" json:"pod,omitempty"`
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

Data about the response and how to apply its contents.

func (*ResponseMetadata) Descriptor deprecated

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

Deprecated: Use ResponseMetadata.ProtoReflect.Descriptor instead.

func (*ResponseMetadata) GetPod

func (x *ResponseMetadata) GetPod() string

func (*ResponseMetadata) GetStartOver

func (x *ResponseMetadata) GetStartOver() bool

func (*ResponseMetadata) GetTimestamp

func (x *ResponseMetadata) GetTimestamp() *timestamppb.Timestamp

func (*ResponseMetadata) ProtoMessage

func (*ResponseMetadata) ProtoMessage()

func (*ResponseMetadata) ProtoReflect

func (x *ResponseMetadata) ProtoReflect() protoreflect.Message

func (*ResponseMetadata) Reset

func (x *ResponseMetadata) Reset()

func (*ResponseMetadata) String

func (x *ResponseMetadata) String() string

type StatusService

type StatusService interface {
	// Method to get updates to the lists of recent commits, their tasks, etc.
	GetIncrementalCommits(context.Context, *GetIncrementalCommitsRequest) (*GetIncrementalCommitsResponse, error)

	// Method to add a comment to a task, commit, or task spec.
	AddComment(context.Context, *AddCommentRequest) (*AddCommentResponse, error)

	// Method to delete a comment to a task, commit, or task spec.
	DeleteComment(context.Context, *DeleteCommentRequest) (*DeleteCommentResponse, error)

	// Method to get latest status of various autorollers.
	GetAutorollerStatuses(context.Context, *GetAutorollerStatusesRequest) (*GetAutorollerStatusesResponse, error)

	// Method to get latest bot usage / capacity metrics.
	GetBotUsage(context.Context, *GetBotUsageRequest) (*GetBotUsageResponse, error)
}

API (non-page, non-resource) endpoints for Status.

func NewStatusServiceJSONClient

func NewStatusServiceJSONClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) StatusService

NewStatusServiceJSONClient creates a JSON client that implements the StatusService interface. It communicates using JSON and can be configured with a custom HTTPClient.

func NewStatusServiceProtobufClient

func NewStatusServiceProtobufClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) StatusService

NewStatusServiceProtobufClient creates a Protobuf client that implements the StatusService interface. It communicates using Protobuf and can be configured with a custom HTTPClient.

type Task

type Task struct {
	Commits        []string `protobuf:"bytes,1,rep,name=commits,proto3" json:"commits,omitempty"`
	Name           string   `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Id             string   `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"`
	Revision       string   `protobuf:"bytes,4,opt,name=revision,proto3" json:"revision,omitempty"`
	Status         string   `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"`
	SwarmingTaskId string   `protobuf:"bytes,6,opt,name=swarming_task_id,json=swarmingTaskId,proto3" json:"swarming_task_id,omitempty"`
	// contains filtered or unexported fields
}

Represents a single task, what commits it covered, its status and results.

func (*Task) Descriptor deprecated

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

Deprecated: Use Task.ProtoReflect.Descriptor instead.

func (*Task) GetCommits

func (x *Task) GetCommits() []string

func (*Task) GetId

func (x *Task) GetId() string

func (*Task) GetName

func (x *Task) GetName() string

func (*Task) GetRevision

func (x *Task) GetRevision() string

func (*Task) GetStatus

func (x *Task) GetStatus() string

func (*Task) GetSwarmingTaskId

func (x *Task) GetSwarmingTaskId() string

func (*Task) ProtoMessage

func (*Task) ProtoMessage()

func (*Task) ProtoReflect

func (x *Task) ProtoReflect() protoreflect.Message

func (*Task) Reset

func (x *Task) Reset()

func (*Task) String

func (x *Task) String() string

type TwirpServer

type TwirpServer interface {
	http.Handler

	// ServiceDescriptor returns gzipped bytes describing the .proto file that
	// this service was generated from. Once unzipped, the bytes can be
	// unmarshalled as a
	// github.com/golang/protobuf/protoc-gen-go/descriptor.FileDescriptorProto.
	//
	// The returned integer is the index of this particular service within that
	// FileDescriptorProto's 'Service' slice of ServiceDescriptorProtos. This is a
	// low-level field, expected to be used for reflection.
	ServiceDescriptor() ([]byte, int)

	// ProtocGenTwirpVersion is the semantic version string of the version of
	// twirp used to generate this file.
	ProtocGenTwirpVersion() string

	// PathPrefix returns the HTTP URL path prefix for all methods handled by this
	// service. This can be used with an HTTP mux to route Twirp requests.
	// The path prefix is in the form: "/<prefix>/<package>.<Service>/"
	// that is, everything in a Twirp route except for the <Method> at the end.
	PathPrefix() string
}

TwirpServer is the interface generated server structs will support: they're HTTP handlers with additional methods for accessing metadata about the service. Those accessors are a low-level API for building reflection tools. Most people can think of TwirpServers as just http.Handlers.

func NewStatusServiceServer

func NewStatusServiceServer(svc StatusService, opts ...interface{}) TwirpServer

NewStatusServiceServer builds a TwirpServer that can be used as an http.Handler to handle HTTP requests that are routed to the right method in the provided svc implementation. The opts are twirp.ServerOption modifiers, for example twirp.WithServerHooks(hooks).

Jump to

Keyboard shortcuts

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