luci: go.chromium.org/luci/common/api/machine_provider/machine/v1 Index | Files

package machine

import "go.chromium.org/luci/common/api/machine_provider/machine/v1"

Package machine provides access to the .

Usage example:

import "go.chromium.org/luci/common/api/machine_provider/machine/v1"
...
machineService, err := machine.New(oauthHttpClient)

Index

Package Files

machine-gen.go

Constants

const (
    // https://www.googleapis.com/auth/userinfo.email
    UserinfoEmailScope = "https://www.googleapis.com/auth/userinfo.email"
)

OAuth2 scopes used by this API.

type AckCall Uses

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

func (*AckCall) Context Uses

func (c *AckCall) Context(ctx context.Context) *AckCall

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 Uses

func (c *AckCall) Do(opts ...googleapi.CallOption) error

Do executes the "machine.ack" call.

func (*AckCall) Fields Uses

func (c *AckCall) Fields(s ...googleapi.Field) *AckCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AckCall) Header Uses

func (c *AckCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type ComponentsMachineProviderInstructionsInstruction Uses

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 Uses

func (s *ComponentsMachineProviderInstructionsInstruction) MarshalJSON() ([]byte, error)

type ComponentsMachineProviderRpcMessagesAckRequest Uses

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 Uses

func (s *ComponentsMachineProviderRpcMessagesAckRequest) MarshalJSON() ([]byte, error)

type ComponentsMachineProviderRpcMessagesPollRequest Uses

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 Uses

func (s *ComponentsMachineProviderRpcMessagesPollRequest) MarshalJSON() ([]byte, error)

type ComponentsMachineProviderRpcMessagesPollResponse Uses

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 Uses

func (s *ComponentsMachineProviderRpcMessagesPollResponse) MarshalJSON() ([]byte, error)

type PollCall Uses

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

func (*PollCall) Context Uses

func (c *PollCall) Context(ctx context.Context) *PollCall

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 Uses

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 Uses

func (c *PollCall) Fields(s ...googleapi.Field) *PollCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*PollCall) Header Uses

func (c *PollCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type Service Uses

type Service struct {
    BasePath  string // API endpoint base URL
    UserAgent string // optional additional User-Agent fragment
    // contains filtered or unexported fields
}

func New Uses

func New(client *http.Client) (*Service, error)

func (*Service) Ack Uses

func (s *Service) Ack(componentsmachineproviderrpcmessagesackrequest *ComponentsMachineProviderRpcMessagesAckRequest) *AckCall

Ack: Handles an incoming AckRequest.

func (*Service) Poll Uses

func (s *Service) Poll(componentsmachineproviderrpcmessagespollrequest *ComponentsMachineProviderRpcMessagesPollRequest) *PollCall

Poll: Handles an incoming PollRequest.

Package machine imports 12 packages (graph). Updated 2018-12-17. Refresh now. Tools for package owners.