longrunning

package
v0.0.0-...-694d95b Latest Latest
Warning

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

Go to latest
Published: May 23, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterOperationsServer

func RegisterOperationsServer(s *grpc.Server, srv OperationsServer)

Types

type CancelOperationRequest

type CancelOperationRequest struct {
	// The name of the operation resource to be cancelled.
	Name                 string   `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The request message for [Operations.CancelOperation][google.longrunning.Operations.CancelOperation].

func (*CancelOperationRequest) Descriptor

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

func (*CancelOperationRequest) GetName

func (m *CancelOperationRequest) GetName() string

func (*CancelOperationRequest) ProtoMessage

func (*CancelOperationRequest) ProtoMessage()

func (*CancelOperationRequest) Reset

func (m *CancelOperationRequest) Reset()

func (*CancelOperationRequest) String

func (m *CancelOperationRequest) String() string

func (*CancelOperationRequest) XXX_DiscardUnknown

func (m *CancelOperationRequest) XXX_DiscardUnknown()

func (*CancelOperationRequest) XXX_Marshal

func (m *CancelOperationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CancelOperationRequest) XXX_Merge

func (dst *CancelOperationRequest) XXX_Merge(src proto.Message)

func (*CancelOperationRequest) XXX_Size

func (m *CancelOperationRequest) XXX_Size() int

func (*CancelOperationRequest) XXX_Unmarshal

func (m *CancelOperationRequest) XXX_Unmarshal(b []byte) error

type DeleteOperationRequest

type DeleteOperationRequest struct {
	// The name of the operation resource to be deleted.
	Name                 string   `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The request message for [Operations.DeleteOperation][google.longrunning.Operations.DeleteOperation].

func (*DeleteOperationRequest) Descriptor

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

func (*DeleteOperationRequest) GetName

func (m *DeleteOperationRequest) GetName() string

func (*DeleteOperationRequest) ProtoMessage

func (*DeleteOperationRequest) ProtoMessage()

func (*DeleteOperationRequest) Reset

func (m *DeleteOperationRequest) Reset()

func (*DeleteOperationRequest) String

func (m *DeleteOperationRequest) String() string

func (*DeleteOperationRequest) XXX_DiscardUnknown

func (m *DeleteOperationRequest) XXX_DiscardUnknown()

func (*DeleteOperationRequest) XXX_Marshal

func (m *DeleteOperationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DeleteOperationRequest) XXX_Merge

func (dst *DeleteOperationRequest) XXX_Merge(src proto.Message)

func (*DeleteOperationRequest) XXX_Size

func (m *DeleteOperationRequest) XXX_Size() int

func (*DeleteOperationRequest) XXX_Unmarshal

func (m *DeleteOperationRequest) XXX_Unmarshal(b []byte) error

type GetOperationRequest

type GetOperationRequest struct {
	// The name of the operation resource.
	Name                 string   `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The request message for [Operations.GetOperation][google.longrunning.Operations.GetOperation].

func (*GetOperationRequest) Descriptor

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

func (*GetOperationRequest) GetName

func (m *GetOperationRequest) GetName() string

func (*GetOperationRequest) ProtoMessage

func (*GetOperationRequest) ProtoMessage()

func (*GetOperationRequest) Reset

func (m *GetOperationRequest) Reset()

func (*GetOperationRequest) String

func (m *GetOperationRequest) String() string

func (*GetOperationRequest) XXX_DiscardUnknown

func (m *GetOperationRequest) XXX_DiscardUnknown()

func (*GetOperationRequest) XXX_Marshal

func (m *GetOperationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetOperationRequest) XXX_Merge

func (dst *GetOperationRequest) XXX_Merge(src proto.Message)

func (*GetOperationRequest) XXX_Size

func (m *GetOperationRequest) XXX_Size() int

func (*GetOperationRequest) XXX_Unmarshal

func (m *GetOperationRequest) XXX_Unmarshal(b []byte) error

type ListOperationsRequest

type ListOperationsRequest struct {
	// The name of the operation collection.
	Name string `protobuf:"bytes,4,opt,name=name" json:"name,omitempty"`
	// The standard list filter.
	Filter string `protobuf:"bytes,1,opt,name=filter" json:"filter,omitempty"`
	// The standard list page size.
	PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize" json:"page_size,omitempty"`
	// The standard list page token.
	PageToken            string   `protobuf:"bytes,3,opt,name=page_token,json=pageToken" json:"page_token,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The request message for [Operations.ListOperations][google.longrunning.Operations.ListOperations].

func (*ListOperationsRequest) Descriptor

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

func (*ListOperationsRequest) GetFilter

func (m *ListOperationsRequest) GetFilter() string

func (*ListOperationsRequest) GetName

func (m *ListOperationsRequest) GetName() string

func (*ListOperationsRequest) GetPageSize

func (m *ListOperationsRequest) GetPageSize() int32

func (*ListOperationsRequest) GetPageToken

func (m *ListOperationsRequest) GetPageToken() string

func (*ListOperationsRequest) ProtoMessage

func (*ListOperationsRequest) ProtoMessage()

func (*ListOperationsRequest) Reset

func (m *ListOperationsRequest) Reset()

func (*ListOperationsRequest) String

func (m *ListOperationsRequest) String() string

func (*ListOperationsRequest) XXX_DiscardUnknown

func (m *ListOperationsRequest) XXX_DiscardUnknown()

func (*ListOperationsRequest) XXX_Marshal

func (m *ListOperationsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListOperationsRequest) XXX_Merge

func (dst *ListOperationsRequest) XXX_Merge(src proto.Message)

func (*ListOperationsRequest) XXX_Size

func (m *ListOperationsRequest) XXX_Size() int

func (*ListOperationsRequest) XXX_Unmarshal

func (m *ListOperationsRequest) XXX_Unmarshal(b []byte) error

type ListOperationsResponse

type ListOperationsResponse struct {
	// A list of operations that matches the specified filter in the request.
	Operations []*Operation `protobuf:"bytes,1,rep,name=operations" json:"operations,omitempty"`
	// The standard List next-page token.
	NextPageToken        string   `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken" json:"next_page_token,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The response message for [Operations.ListOperations][google.longrunning.Operations.ListOperations].

func (*ListOperationsResponse) Descriptor

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

func (*ListOperationsResponse) GetNextPageToken

func (m *ListOperationsResponse) GetNextPageToken() string

func (*ListOperationsResponse) GetOperations

func (m *ListOperationsResponse) GetOperations() []*Operation

func (*ListOperationsResponse) ProtoMessage

func (*ListOperationsResponse) ProtoMessage()

func (*ListOperationsResponse) Reset

func (m *ListOperationsResponse) Reset()

func (*ListOperationsResponse) String

func (m *ListOperationsResponse) String() string

func (*ListOperationsResponse) XXX_DiscardUnknown

func (m *ListOperationsResponse) XXX_DiscardUnknown()

func (*ListOperationsResponse) XXX_Marshal

func (m *ListOperationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListOperationsResponse) XXX_Merge

func (dst *ListOperationsResponse) XXX_Merge(src proto.Message)

func (*ListOperationsResponse) XXX_Size

func (m *ListOperationsResponse) XXX_Size() int

func (*ListOperationsResponse) XXX_Unmarshal

func (m *ListOperationsResponse) XXX_Unmarshal(b []byte) error

type Operation

type Operation struct {
	// The server-assigned name, which is only unique within the same service that
	// originally returns it. If you use the default HTTP mapping, the
	// `name` should have the format of `operations/some/unique/name`.
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// Service-specific metadata associated with the operation.  It typically
	// contains progress information and common metadata such as create time.
	// Some services might not provide such metadata.  Any method that returns a
	// long-running operation should document the metadata type, if any.
	Metadata *any.Any `protobuf:"bytes,2,opt,name=metadata" json:"metadata,omitempty"`
	// If the value is `false`, it means the operation is still in progress.
	// If true, the operation is completed, and either `error` or `response` is
	// available.
	Done bool `protobuf:"varint,3,opt,name=done" json:"done,omitempty"`
	// The operation result, which can be either an `error` or a valid `response`.
	// If `done` == `false`, neither `error` nor `response` is set.
	// If `done` == `true`, exactly one of `error` or `response` is set.
	//
	// Types that are valid to be assigned to Result:
	//	*Operation_Error
	//	*Operation_Response
	Result               isOperation_Result `protobuf_oneof:"result"`
	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
	XXX_unrecognized     []byte             `json:"-"`
	XXX_sizecache        int32              `json:"-"`
}

This resource represents a long-running operation that is the result of a network API call.

func (*Operation) Descriptor

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

func (*Operation) GetDone

func (m *Operation) GetDone() bool

func (*Operation) GetError

func (m *Operation) GetError() *status.Status

func (*Operation) GetMetadata

func (m *Operation) GetMetadata() *any.Any

func (*Operation) GetName

func (m *Operation) GetName() string

func (*Operation) GetResponse

func (m *Operation) GetResponse() *any.Any

func (*Operation) GetResult

func (m *Operation) GetResult() isOperation_Result

func (*Operation) ProtoMessage

func (*Operation) ProtoMessage()

func (*Operation) Reset

func (m *Operation) Reset()

func (*Operation) String

func (m *Operation) String() string

func (*Operation) XXX_DiscardUnknown

func (m *Operation) XXX_DiscardUnknown()

func (*Operation) XXX_Marshal

func (m *Operation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Operation) XXX_Merge

func (dst *Operation) XXX_Merge(src proto.Message)

func (*Operation) XXX_OneofFuncs

func (*Operation) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*Operation) XXX_Size

func (m *Operation) XXX_Size() int

func (*Operation) XXX_Unmarshal

func (m *Operation) XXX_Unmarshal(b []byte) error

type Operation_Error

type Operation_Error struct {
	Error *status.Status `protobuf:"bytes,4,opt,name=error,oneof"`
}

type Operation_Response

type Operation_Response struct {
	Response *any.Any `protobuf:"bytes,5,opt,name=response,oneof"`
}

type OperationsClient

type OperationsClient interface {
	// Lists operations that match the specified filter in the request. If the
	// server doesn't support this method, it returns `UNIMPLEMENTED`.
	//
	// NOTE: the `name` binding below allows API services to override the binding
	// to use different resource name schemes, such as `users/*/operations`.
	ListOperations(ctx context.Context, in *ListOperationsRequest, opts ...grpc.CallOption) (*ListOperationsResponse, error)
	// Gets the latest state of a long-running operation.  Clients can use this
	// method to poll the operation result at intervals as recommended by the API
	// service.
	GetOperation(ctx context.Context, in *GetOperationRequest, opts ...grpc.CallOption) (*Operation, error)
	// Deletes a long-running operation. This method indicates that the client is
	// no longer interested in the operation result. It does not cancel the
	// operation. If the server doesn't support this method, it returns
	// `google.rpc.Code.UNIMPLEMENTED`.
	DeleteOperation(ctx context.Context, in *DeleteOperationRequest, opts ...grpc.CallOption) (*empty.Empty, error)
	// Starts asynchronous cancellation on a long-running operation.  The server
	// makes a best effort to cancel the operation, but success is not
	// guaranteed.  If the server doesn't support this method, it returns
	// `google.rpc.Code.UNIMPLEMENTED`.  Clients can use
	// [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
	// other methods to check whether the cancellation succeeded or whether the
	// operation completed despite cancellation. On successful cancellation,
	// the operation is not deleted; instead, it becomes an operation with
	// an [Operation.error][google.longrunning.Operation.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
	// corresponding to `Code.CANCELLED`.
	CancelOperation(ctx context.Context, in *CancelOperationRequest, opts ...grpc.CallOption) (*empty.Empty, error)
}

OperationsClient is the client API for Operations service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewOperationsClient

func NewOperationsClient(cc *grpc.ClientConn) OperationsClient

type OperationsServer

type OperationsServer interface {
	// Lists operations that match the specified filter in the request. If the
	// server doesn't support this method, it returns `UNIMPLEMENTED`.
	//
	// NOTE: the `name` binding below allows API services to override the binding
	// to use different resource name schemes, such as `users/*/operations`.
	ListOperations(context.Context, *ListOperationsRequest) (*ListOperationsResponse, error)
	// Gets the latest state of a long-running operation.  Clients can use this
	// method to poll the operation result at intervals as recommended by the API
	// service.
	GetOperation(context.Context, *GetOperationRequest) (*Operation, error)
	// Deletes a long-running operation. This method indicates that the client is
	// no longer interested in the operation result. It does not cancel the
	// operation. If the server doesn't support this method, it returns
	// `google.rpc.Code.UNIMPLEMENTED`.
	DeleteOperation(context.Context, *DeleteOperationRequest) (*empty.Empty, error)
	// Starts asynchronous cancellation on a long-running operation.  The server
	// makes a best effort to cancel the operation, but success is not
	// guaranteed.  If the server doesn't support this method, it returns
	// `google.rpc.Code.UNIMPLEMENTED`.  Clients can use
	// [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
	// other methods to check whether the cancellation succeeded or whether the
	// operation completed despite cancellation. On successful cancellation,
	// the operation is not deleted; instead, it becomes an operation with
	// an [Operation.error][google.longrunning.Operation.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
	// corresponding to `Code.CANCELLED`.
	CancelOperation(context.Context, *CancelOperationRequest) (*empty.Empty, error)
}

Jump to

Keyboard shortcuts

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