Live Stream API v1 - Package cloud.google.com/go/video/livestream/apiv1 (v1.7.0)

Package livestream is an auto-generated package for the Live Stream API.

Example usage

To get started with this package, create a client.

ctx := context.Background()
c, err := livestream.NewClient(ctx)
if err != nil {
    // TODO: Handle error.
}
defer c.Close()

The client will use your default application credentials. Clients should be reused instead of created as needed. The methods of Client are safe for concurrent use by multiple goroutines. The returned client must be Closed when it is done being used.

Using the Client

The following is an example of making an API call with the newly created client.

ctx := context.Background()
c, err := livestream.NewClient(ctx)
if err != nil {
    // TODO: Handle error.
}
defer c.Close()

req := &livestreampb.CreateChannelRequest{
    // TODO: Fill request struct fields.
    // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/video/livestream/v1#CreateChannelRequest.
}
op, err := c.CreateChannel(ctx, req)
if err != nil {
    // TODO: Handle error.
}

resp, err := op.Wait(ctx)
if err != nil {
    // TODO: Handle error.
}
// TODO: Use resp.
_ = resp

Use of Context

The ctx passed to NewClient is used for authentication requests and for creating the underlying connection, but is not used for subsequent calls. Individual methods on the client use the ctx given to them.

To close the open connection, use the Close() method.

For information about setting deadlines, reusing contexts, and more please visit https://pkg.go.dev/cloud.google.com/go.

Functions

func DefaultAuthScopes

func DefaultAuthScopes() []string

DefaultAuthScopes reports the default set of authentication scopes to use with this package.

CallOptions

type CallOptions struct {
	CreateChannel []gax.CallOption
	ListChannels  []gax.CallOption
	GetChannel    []gax.CallOption
	DeleteChannel []gax.CallOption
	UpdateChannel []gax.CallOption
	StartChannel  []gax.CallOption
	StopChannel   []gax.CallOption
	CreateInput   []gax.CallOption
	ListInputs    []gax.CallOption
	GetInput      []gax.CallOption
	DeleteInput   []gax.CallOption
	UpdateInput   []gax.CallOption
	CreateEvent   []gax.CallOption
	ListEvents    []gax.CallOption
	GetEvent      []gax.CallOption
	DeleteEvent   []gax.CallOption
}

CallOptions contains the retry settings for each method of Client.

ChannelIterator

type ChannelIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*livestreampb.Channel, nextPageToken string, err error)
	// contains filtered or unexported fields
}

ChannelIterator manages a stream of *livestreampb.Channel.

func (*ChannelIterator) Next

func (it *ChannelIterator) Next() (*livestreampb.Channel, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*ChannelIterator) PageInfo

func (it *ChannelIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

Client

type Client struct {

	// The call options for this service.
	CallOptions *CallOptions

	// LROClient is used internally to handle long-running operations.
	// It is exposed so that its CallOptions can be modified if required.
	// Users should not Close this client.
	LROClient *lroauto.OperationsClient
	// contains filtered or unexported fields
}

Client is a client for interacting with Live Stream API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Using Live Stream API, you can generate live streams in the various renditions and streaming formats. The streaming format include HTTP Live Streaming (HLS) and Dynamic Adaptive Streaming over HTTP (DASH). You can send a source stream in the various ways, including Real-Time Messaging Protocol (RTMP) and Secure Reliable Transport (SRT).

func NewClient

func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error)

NewClient creates a new livestream service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.

Using Live Stream API, you can generate live streams in the various renditions and streaming formats. The streaming format include HTTP Live Streaming (HLS) and Dynamic Adaptive Streaming over HTTP (DASH). You can send a source stream in the various ways, including Real-Time Messaging Protocol (RTMP) and Secure Reliable Transport (SRT).

Example

package main

import (
	livestream "cloud.google.com/go/video/livestream/apiv1"
	"context"
)

func main() {
	ctx := context.Background()
	c, err := livestream.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*Client) Close

func (c *Client) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*Client) Connection

func (c *Client) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*Client) CreateChannel

CreateChannel creates a channel with the provided unique ID in the specified region.

Example

package main

import (
	livestream "cloud.google.com/go/video/livestream/apiv1"
	"context"
	livestreampb "google.golang.org/genproto/googleapis/cloud/video/livestream/v1"
)

func main() {
	ctx := context.Background()
	c, err := livestream.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &livestreampb.CreateChannelRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/video/livestream/v1#CreateChannelRequest.
	}
	op, err := c.CreateChannel(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*Client) CreateChannelOperation

func (c *Client) CreateChannelOperation(name string) *CreateChannelOperation

CreateChannelOperation returns a new CreateChannelOperation from a given name. The name must be that of a previously created CreateChannelOperation, possibly from a different process.

func (*Client) CreateEvent

func (c *Client) CreateEvent(ctx context.Context, req *livestreampb.CreateEventRequest, opts ...gax.CallOption) (*livestreampb.Event, error)

CreateEvent creates an event with the provided unique ID in the specified channel.

Example

package main

import (
	livestream "cloud.google.com/go/video/livestream/apiv1"
	"context"
	livestreampb "google.golang.org/genproto/googleapis/cloud/video/livestream/v1"
)

func main() {
	ctx := context.Background()
	c, err := livestream.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &livestreampb.CreateEventRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/video/livestream/v1#CreateEventRequest.
	}
	resp, err := c.CreateEvent(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*Client) CreateInput

CreateInput creates an input with the provided unique ID in the specified region.

Example

package main

import (
	livestream "cloud.google.com/go/video/livestream/apiv1"
	"context"
	livestreampb "google.golang.org/genproto/googleapis/cloud/video/livestream/v1"
)

func main() {
	ctx := context.Background()
	c, err := livestream.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &livestreampb.CreateInputRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/video/livestream/v1#CreateInputRequest.
	}
	op, err := c.CreateInput(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*Client) CreateInputOperation

func (c *Client) CreateInputOperation(name string) *CreateInputOperation

CreateInputOperation returns a new CreateInputOperation from a given name. The name must be that of a previously created CreateInputOperation, possibly from a different process.

func (*Client) DeleteChannel

DeleteChannel deletes the specified channel.

Example

package main

import (
	livestream "cloud.google.com/go/video/livestream/apiv1"
	"context"
	livestreampb "google.golang.org/genproto/googleapis/cloud/video/livestream/v1"
)

func main() {
	ctx := context.Background()
	c, err := livestream.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &livestreampb.DeleteChannelRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/video/livestream/v1#DeleteChannelRequest.
	}
	op, err := c.DeleteChannel(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	err = op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*Client) DeleteChannelOperation

func (c *Client) DeleteChannelOperation(name string) *DeleteChannelOperation

DeleteChannelOperation returns a new DeleteChannelOperation from a given name. The name must be that of a previously created DeleteChannelOperation, possibly from a different process.

func (*Client) DeleteEvent

func (c *Client) DeleteEvent(ctx context.Context, req *livestreampb.DeleteEventRequest, opts ...gax.CallOption) error

DeleteEvent deletes the specified event.

Example

package main

import (
	livestream "cloud.google.com/go/video/livestream/apiv1"
	"context"
	livestreampb "google.golang.org/genproto/googleapis/cloud/video/livestream/v1"
)

func main() {
	ctx := context.Background()
	c, err := livestream.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &livestreampb.DeleteEventRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/video/livestream/v1#DeleteEventRequest.
	}
	err = c.DeleteEvent(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*Client) DeleteInput

DeleteInput deletes the specified input.

Example

package main

import (
	livestream "cloud.google.com/go/video/livestream/apiv1"
	"context"
	livestreampb "google.golang.org/genproto/googleapis/cloud/video/livestream/v1"
)

func main() {
	ctx := context.Background()
	c, err := livestream.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &livestreampb.DeleteInputRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/video/livestream/v1#DeleteInputRequest.
	}
	op, err := c.DeleteInput(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	err = op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*Client) DeleteInputOperation

func (c *Client) DeleteInputOperation(name string) *DeleteInputOperation

DeleteInputOperation returns a new DeleteInputOperation from a given name. The name must be that of a previously created DeleteInputOperation, possibly from a different process.

func (*Client) GetChannel

GetChannel returns the specified channel.

Example

package main

import (
	livestream "cloud.google.com/go/video/livestream/apiv1"
	"context"
	livestreampb "google.golang.org/genproto/googleapis/cloud/video/livestream/v1"
)

func main() {
	ctx := context.Background()
	c, err := livestream.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &livestreampb.GetChannelRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/video/livestream/v1#GetChannelRequest.
	}
	resp, err := c.GetChannel(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*Client) GetEvent

GetEvent returns the specified event.

Example

package main

import (
	livestream "cloud.google.com/go/video/livestream/apiv1"
	"context"
	livestreampb "google.golang.org/genproto/googleapis/cloud/video/livestream/v1"
)

func main() {
	ctx := context.Background()
	c, err := livestream.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &livestreampb.GetEventRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/video/livestream/v1#GetEventRequest.
	}
	resp, err := c.GetEvent(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*Client) GetInput

GetInput returns the specified input.

Example

package main

import (
	livestream "cloud.google.com/go/video/livestream/apiv1"
	"context"
	livestreampb "google.golang.org/genproto/googleapis/cloud/video/livestream/v1"
)

func main() {
	ctx := context.Background()
	c, err := livestream.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &livestreampb.GetInputRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/video/livestream/v1#GetInputRequest.
	}
	resp, err := c.GetInput(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*Client) ListChannels

func (c *Client) ListChannels(ctx context.Context, req *livestreampb.ListChannelsRequest, opts ...gax.CallOption) *ChannelIterator

ListChannels returns a list of all channels in the specified region.

Example

package main

import (
	livestream "cloud.google.com/go/video/livestream/apiv1"
	"context"
	"google.golang.org/api/iterator"
	livestreampb "google.golang.org/genproto/googleapis/cloud/video/livestream/v1"
)

func main() {
	ctx := context.Background()
	c, err := livestream.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &livestreampb.ListChannelsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/video/livestream/v1#ListChannelsRequest.
	}
	it := c.ListChannels(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*Client) ListEvents

func (c *Client) ListEvents(ctx context.Context, req *livestreampb.ListEventsRequest, opts ...gax.CallOption) *EventIterator

ListEvents returns a list of all events in the specified channel.

Example

package main

import (
	livestream "cloud.google.com/go/video/livestream/apiv1"
	"context"
	"google.golang.org/api/iterator"
	livestreampb "google.golang.org/genproto/googleapis/cloud/video/livestream/v1"
)

func main() {
	ctx := context.Background()
	c, err := livestream.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &livestreampb.ListEventsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/video/livestream/v1#ListEventsRequest.
	}
	it := c.ListEvents(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*Client) ListInputs

func (c *Client) ListInputs(ctx context.Context, req *livestreampb.ListInputsRequest, opts ...gax.CallOption) *InputIterator

ListInputs returns a list of all inputs in the specified region.

Example

package main

import (
	livestream "cloud.google.com/go/video/livestream/apiv1"
	"context"
	"google.golang.org/api/iterator"
	livestreampb "google.golang.org/genproto/googleapis/cloud/video/livestream/v1"
)

func main() {
	ctx := context.Background()
	c, err := livestream.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &livestreampb.ListInputsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/video/livestream/v1#ListInputsRequest.
	}
	it := c.ListInputs(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*Client) StartChannel

StartChannel starts the specified channel. Part of the video pipeline will be created only when the StartChannel request is received by the server.

Example

package main

import (
	livestream "cloud.google.com/go/video/livestream/apiv1"
	"context"
	livestreampb "google.golang.org/genproto/googleapis/cloud/video/livestream/v1"
)

func main() {
	ctx := context.Background()
	c, err := livestream.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &livestreampb.StartChannelRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/video/livestream/v1#StartChannelRequest.
	}
	op, err := c.StartChannel(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*Client) StartChannelOperation

func (c *Client) StartChannelOperation(name string) *StartChannelOperation

StartChannelOperation returns a new StartChannelOperation from a given name. The name must be that of a previously created StartChannelOperation, possibly from a different process.

func (*Client) StopChannel

StopChannel stops the specified channel. Part of the video pipeline will be released when the StopChannel request is received by the server.

Example

package main

import (
	livestream "cloud.google.com/go/video/livestream/apiv1"
	"context"
	livestreampb "google.golang.org/genproto/googleapis/cloud/video/livestream/v1"
)

func main() {
	ctx := context.Background()
	c, err := livestream.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &livestreampb.StopChannelRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/video/livestream/v1#StopChannelRequest.
	}
	op, err := c.StopChannel(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*Client) StopChannelOperation

func (c *Client) StopChannelOperation(name string) *StopChannelOperation

StopChannelOperation returns a new StopChannelOperation from a given name. The name must be that of a previously created StopChannelOperation, possibly from a different process.

func (*Client) UpdateChannel

UpdateChannel updates the specified channel.

Example

package main

import (
	livestream "cloud.google.com/go/video/livestream/apiv1"
	"context"
	livestreampb "google.golang.org/genproto/googleapis/cloud/video/livestream/v1"
)

func main() {
	ctx := context.Background()
	c, err := livestream.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &livestreampb.UpdateChannelRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/video/livestream/v1#UpdateChannelRequest.
	}
	op, err := c.UpdateChannel(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*Client) UpdateChannelOperation

func (c *Client) UpdateChannelOperation(name string) *UpdateChannelOperation

UpdateChannelOperation returns a new UpdateChannelOperation from a given name. The name must be that of a previously created UpdateChannelOperation, possibly from a different process.

func (*Client) UpdateInput

UpdateInput updates the specified input.

Example

package main

import (
	livestream "cloud.google.com/go/video/livestream/apiv1"
	"context"
	livestreampb "google.golang.org/genproto/googleapis/cloud/video/livestream/v1"
)

func main() {
	ctx := context.Background()
	c, err := livestream.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &livestreampb.UpdateInputRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/video/livestream/v1#UpdateInputRequest.
	}
	op, err := c.UpdateInput(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*Client) UpdateInputOperation

func (c *Client) UpdateInputOperation(name string) *UpdateInputOperation

UpdateInputOperation returns a new UpdateInputOperation from a given name. The name must be that of a previously created UpdateInputOperation, possibly from a different process.

CreateChannelOperation

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

CreateChannelOperation manages a long-running operation from CreateChannel.

func (*CreateChannelOperation) Done

func (op *CreateChannelOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*CreateChannelOperation) Metadata

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*CreateChannelOperation) Name

func (op *CreateChannelOperation) Name() string

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*CreateChannelOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*CreateChannelOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

CreateInputOperation

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

CreateInputOperation manages a long-running operation from CreateInput.

func (*CreateInputOperation) Done

func (op *CreateInputOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*CreateInputOperation) Metadata

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*CreateInputOperation) Name

func (op *CreateInputOperation) Name() string

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*CreateInputOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*CreateInputOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteChannelOperation

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

DeleteChannelOperation manages a long-running operation from DeleteChannel.

func (*DeleteChannelOperation) Done

func (op *DeleteChannelOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*DeleteChannelOperation) Metadata

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteChannelOperation) Name

func (op *DeleteChannelOperation) Name() string

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteChannelOperation) Poll

func (op *DeleteChannelOperation) Poll(ctx context.Context, opts ...gax.CallOption) error

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteChannelOperation) Wait

func (op *DeleteChannelOperation) Wait(ctx context.Context, opts ...gax.CallOption) error

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteInputOperation

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

DeleteInputOperation manages a long-running operation from DeleteInput.

func (*DeleteInputOperation) Done

func (op *DeleteInputOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*DeleteInputOperation) Metadata

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteInputOperation) Name

func (op *DeleteInputOperation) Name() string

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteInputOperation) Poll

func (op *DeleteInputOperation) Poll(ctx context.Context, opts ...gax.CallOption) error

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteInputOperation) Wait

func (op *DeleteInputOperation) Wait(ctx context.Context, opts ...gax.CallOption) error

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

EventIterator

type EventIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*livestreampb.Event, nextPageToken string, err error)
	// contains filtered or unexported fields
}

EventIterator manages a stream of *livestreampb.Event.

func (*EventIterator) Next

func (it *EventIterator) Next() (*livestreampb.Event, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*EventIterator) PageInfo

func (it *EventIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

InputIterator

type InputIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*livestreampb.Input, nextPageToken string, err error)
	// contains filtered or unexported fields
}

InputIterator manages a stream of *livestreampb.Input.

func (*InputIterator) Next

func (it *InputIterator) Next() (*livestreampb.Input, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*InputIterator) PageInfo

func (it *InputIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

StartChannelOperation

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

StartChannelOperation manages a long-running operation from StartChannel.

func (*StartChannelOperation) Done

func (op *StartChannelOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*StartChannelOperation) Metadata

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*StartChannelOperation) Name

func (op *StartChannelOperation) Name() string

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*StartChannelOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*StartChannelOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

StopChannelOperation

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

StopChannelOperation manages a long-running operation from StopChannel.

func (*StopChannelOperation) Done

func (op *StopChannelOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*StopChannelOperation) Metadata

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*StopChannelOperation) Name

func (op *StopChannelOperation) Name() string

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*StopChannelOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*StopChannelOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

UpdateChannelOperation

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

UpdateChannelOperation manages a long-running operation from UpdateChannel.

func (*UpdateChannelOperation) Done

func (op *UpdateChannelOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*UpdateChannelOperation) Metadata

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*UpdateChannelOperation) Name

func (op *UpdateChannelOperation) Name() string

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*UpdateChannelOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*UpdateChannelOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

UpdateInputOperation

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

UpdateInputOperation manages a long-running operation from UpdateInput.

func (*UpdateInputOperation) Done

func (op *UpdateInputOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*UpdateInputOperation) Metadata

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*UpdateInputOperation) Name

func (op *UpdateInputOperation) Name() string

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*UpdateInputOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*UpdateInputOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.