machine

package
v0.0.0-...-d60a78d Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

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

View Source
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

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

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

Do executes the "machine.ack" call.

func (*AckCall) Fields

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

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

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

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

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

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

type PollCall

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

func (*PollCall) Context

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

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

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

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

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

func New

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

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.

Jump to

Keyboard shortcuts

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