Documentation ¶
Overview ¶
Package machine provides access to the .
Usage example:
import "github.com/TriggerMail/luci-go/common/api/machine_provider/machine/v1" ... machineService, err := machine.New(oauthHttpClient)
Index ¶
Constants ¶
const (
// https://www.googleapis.com/auth/userinfo.email
UserinfoEmailScope = "https://www.googleapis.com/auth/userinfo.email"
)
OAuth2 scopes used by this API.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AckCall ¶
type AckCall struct {
// contains filtered or unexported fields
}
func (*AckCall) Context ¶
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*AckCall) Do ¶
func (c *AckCall) Do(opts ...googleapi.CallOption) error
Do executes the "machine.ack" call.
func (*AckCall) Fields ¶
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type ComponentsMachineProviderInstructionsInstruction ¶
type ComponentsMachineProviderInstructionsInstruction struct { SwarmingServer string `json:"swarming_server,omitempty"` // ForceSendFields is a list of field names (e.g. "SwarmingServer") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "SwarmingServer") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the // server as null. It is an error if a field in this list has a // non-empty value. This may be used to include null fields in Patch // requests. NullFields []string `json:"-"` }
ComponentsMachineProviderInstructionsInstruction: Represents instructions for a machine.
func (*ComponentsMachineProviderInstructionsInstruction) MarshalJSON ¶
func (s *ComponentsMachineProviderInstructionsInstruction) MarshalJSON() ([]byte, error)
type ComponentsMachineProviderRpcMessagesAckRequest ¶
type ComponentsMachineProviderRpcMessagesAckRequest struct { // Possible values: // "DUMMY" // "GCE" // "VSPHERE" Backend string `json:"backend,omitempty"` Hostname string `json:"hostname,omitempty"` // ForceSendFields is a list of field names (e.g. "Backend") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Backend") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
ComponentsMachineProviderRpcMessagesAckRequest: Represents a request to ack an instruction received by a machine.
func (*ComponentsMachineProviderRpcMessagesAckRequest) MarshalJSON ¶
func (s *ComponentsMachineProviderRpcMessagesAckRequest) MarshalJSON() ([]byte, error)
type ComponentsMachineProviderRpcMessagesPollRequest ¶
type ComponentsMachineProviderRpcMessagesPollRequest struct { // Possible values: // "DUMMY" // "GCE" // "VSPHERE" Backend string `json:"backend,omitempty"` Hostname string `json:"hostname,omitempty"` // ForceSendFields is a list of field names (e.g. "Backend") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Backend") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
ComponentsMachineProviderRpcMessagesPollRequest: Represents a request to poll for instructions given to a machine.
func (*ComponentsMachineProviderRpcMessagesPollRequest) MarshalJSON ¶
func (s *ComponentsMachineProviderRpcMessagesPollRequest) MarshalJSON() ([]byte, error)
type ComponentsMachineProviderRpcMessagesPollResponse ¶
type ComponentsMachineProviderRpcMessagesPollResponse struct { // Instruction: Represents instructions for a machine. Instruction *ComponentsMachineProviderInstructionsInstruction `json:"instruction,omitempty"` State string `json:"state,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "Instruction") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the // server regardless of whether the field is empty or not. This may be // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Instruction") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
ComponentsMachineProviderRpcMessagesPollResponse: Represents a response to a request for instructions given to a machine.
func (*ComponentsMachineProviderRpcMessagesPollResponse) MarshalJSON ¶
func (s *ComponentsMachineProviderRpcMessagesPollResponse) MarshalJSON() ([]byte, error)
type PollCall ¶
type PollCall struct {
// contains filtered or unexported fields
}
func (*PollCall) Context ¶
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*PollCall) Do ¶
func (c *PollCall) Do(opts ...googleapi.CallOption) (*ComponentsMachineProviderRpcMessagesPollResponse, error)
Do executes the "machine.poll" call. Exactly one of *ComponentsMachineProviderRpcMessagesPollResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ComponentsMachineProviderRpcMessagesPollResponse.ServerResponse.Heade r or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*PollCall) Fields ¶
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type Service ¶
type Service struct { BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment // contains filtered or unexported fields }
func (*Service) Ack ¶
func (s *Service) Ack(componentsmachineproviderrpcmessagesackrequest *ComponentsMachineProviderRpcMessagesAckRequest) *AckCall
Ack: Handles an incoming AckRequest.
func (*Service) Poll ¶
func (s *Service) Poll(componentsmachineproviderrpcmessagespollrequest *ComponentsMachineProviderRpcMessagesPollRequest) *PollCall
Poll: Handles an incoming PollRequest.