Documentation ¶
Index ¶
- Constants
- Variables
- type Option
- type Upstream
- func (upstream *Upstream) AgentEndpoint() endpoint.Endpoint
- func (upstream *Upstream) Connect(ctx context.Context) error
- func (upstream *Upstream) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error)
- func (upstream *Upstream) Name() string
- func (upstream *Upstream) Poll(ctx context.Context, request *api.PollRequest) (*api.PollResponse, error)
- func (upstream *Upstream) PollIntervalSeconds() uint32
- func (upstream *Upstream) QueryRunningTasks(ctx context.Context, request *api.QueryRunningTasksRequest) (*api.QueryRunningTasksResponse, error)
- func (upstream *Upstream) Register(ctx context.Context, workerInfo *api.WorkerInfo) error
- func (upstream *Upstream) RequireTransportSecurity() bool
- func (upstream *Upstream) SetDisabled(ctx context.Context, disabled bool) error
- func (upstream *Upstream) TaskFailed(ctx context.Context, request *api.TaskFailedRequest) error
- func (upstream *Upstream) TaskStarted(ctx context.Context, request *api.TaskIdentification) error
- func (upstream *Upstream) TaskStopped(ctx context.Context, request *api.TaskIdentification) error
- func (upstream *Upstream) WorkerName() string
Constants ¶
View Source
const (
DefaultRPCEndpoint = "https://grpc.cirrus-ci.com:443"
)
Variables ¶
View Source
var (
ErrFailed = errors.New("upstream failed")
)
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Upstream)
func WithAgentEndpoint ¶
func WithLogger ¶
func WithLogger(logger logrus.FieldLogger) Option
func WithRPCEndpoint ¶
type Upstream ¶
type Upstream struct {
// contains filtered or unexported fields
}
func (*Upstream) AgentEndpoint ¶
func (*Upstream) GetRequestMetadata ¶
func (upstream *Upstream) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error)
PerRPCCredentials interface implementation.
func (*Upstream) Poll ¶
func (upstream *Upstream) Poll(ctx context.Context, request *api.PollRequest) (*api.PollResponse, error)
func (*Upstream) PollIntervalSeconds ¶
func (*Upstream) QueryRunningTasks ¶
func (upstream *Upstream) QueryRunningTasks( ctx context.Context, request *api.QueryRunningTasksRequest, ) (*api.QueryRunningTasksResponse, error)
func (*Upstream) RequireTransportSecurity ¶
PerRPCCredentials interface implementation.
func (*Upstream) SetDisabled ¶
func (*Upstream) TaskFailed ¶
func (*Upstream) TaskStarted ¶
func (*Upstream) TaskStopped ¶
func (*Upstream) WorkerName ¶
Click to show internal directories.
Click to hide internal directories.