Documentation
¶
Overview ¶
Package livestream is an auto-generated package for the Live Stream API.
General documentation ¶
For information that is relevant for all client libraries please reference https://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on this page includes:
- Authentication and Authorization
- Timeouts and Cancellation
- Testing against Client Libraries
- Debugging Client Libraries
- Inspecting errors
Example usage ¶
To get started with this package, create a client.
// go get cloud.google.com/go/video/livestream/apiv1@latest
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
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, mentioned above.
req := &livestreampb.CreateAssetRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/video/livestream/apiv1/livestreampb#CreateAssetRequest.
}
op, err := c.CreateAsset(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.
Index ¶
- func DefaultAuthScopes() []string
- type AssetIterator
- type CallOptions
- type ChannelIterator
- type Client
- func (c *Client) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, ...) error
- func (c *Client) Close() error
- func (c *Client) Connection() *grpc.ClientConndeprecated
- func (c *Client) CreateAsset(ctx context.Context, req *livestreampb.CreateAssetRequest, ...) (*CreateAssetOperation, error)
- func (c *Client) CreateAssetOperation(name string) *CreateAssetOperation
- func (c *Client) CreateChannel(ctx context.Context, req *livestreampb.CreateChannelRequest, ...) (*CreateChannelOperation, error)
- func (c *Client) CreateChannelOperation(name string) *CreateChannelOperation
- func (c *Client) CreateClip(ctx context.Context, req *livestreampb.CreateClipRequest, ...) (*CreateClipOperation, error)
- func (c *Client) CreateClipOperation(name string) *CreateClipOperation
- func (c *Client) CreateDvrSession(ctx context.Context, req *livestreampb.CreateDvrSessionRequest, ...) (*CreateDvrSessionOperation, error)
- func (c *Client) CreateDvrSessionOperation(name string) *CreateDvrSessionOperation
- func (c *Client) CreateEvent(ctx context.Context, req *livestreampb.CreateEventRequest, ...) (*livestreampb.Event, error)
- func (c *Client) CreateInput(ctx context.Context, req *livestreampb.CreateInputRequest, ...) (*CreateInputOperation, error)
- func (c *Client) CreateInputOperation(name string) *CreateInputOperation
- func (c *Client) DeleteAsset(ctx context.Context, req *livestreampb.DeleteAssetRequest, ...) (*DeleteAssetOperation, error)
- func (c *Client) DeleteAssetOperation(name string) *DeleteAssetOperation
- func (c *Client) DeleteChannel(ctx context.Context, req *livestreampb.DeleteChannelRequest, ...) (*DeleteChannelOperation, error)
- func (c *Client) DeleteChannelOperation(name string) *DeleteChannelOperation
- func (c *Client) DeleteClip(ctx context.Context, req *livestreampb.DeleteClipRequest, ...) (*DeleteClipOperation, error)
- func (c *Client) DeleteClipOperation(name string) *DeleteClipOperation
- func (c *Client) DeleteDvrSession(ctx context.Context, req *livestreampb.DeleteDvrSessionRequest, ...) (*DeleteDvrSessionOperation, error)
- func (c *Client) DeleteDvrSessionOperation(name string) *DeleteDvrSessionOperation
- func (c *Client) DeleteEvent(ctx context.Context, req *livestreampb.DeleteEventRequest, ...) error
- func (c *Client) DeleteInput(ctx context.Context, req *livestreampb.DeleteInputRequest, ...) (*DeleteInputOperation, error)
- func (c *Client) DeleteInputOperation(name string) *DeleteInputOperation
- func (c *Client) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, ...) error
- func (c *Client) GetAsset(ctx context.Context, req *livestreampb.GetAssetRequest, opts ...gax.CallOption) (*livestreampb.Asset, error)
- func (c *Client) GetChannel(ctx context.Context, req *livestreampb.GetChannelRequest, ...) (*livestreampb.Channel, error)
- func (c *Client) GetClip(ctx context.Context, req *livestreampb.GetClipRequest, opts ...gax.CallOption) (*livestreampb.Clip, error)
- func (c *Client) GetDvrSession(ctx context.Context, req *livestreampb.GetDvrSessionRequest, ...) (*livestreampb.DvrSession, error)
- func (c *Client) GetEvent(ctx context.Context, req *livestreampb.GetEventRequest, opts ...gax.CallOption) (*livestreampb.Event, error)
- func (c *Client) GetInput(ctx context.Context, req *livestreampb.GetInputRequest, opts ...gax.CallOption) (*livestreampb.Input, error)
- func (c *Client) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, ...) (*locationpb.Location, error)
- func (c *Client) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, ...) (*longrunningpb.Operation, error)
- func (c *Client) GetPool(ctx context.Context, req *livestreampb.GetPoolRequest, opts ...gax.CallOption) (*livestreampb.Pool, error)
- func (c *Client) ListAssets(ctx context.Context, req *livestreampb.ListAssetsRequest, ...) *AssetIterator
- func (c *Client) ListChannels(ctx context.Context, req *livestreampb.ListChannelsRequest, ...) *ChannelIterator
- func (c *Client) ListClips(ctx context.Context, req *livestreampb.ListClipsRequest, ...) *ClipIterator
- func (c *Client) ListDvrSessions(ctx context.Context, req *livestreampb.ListDvrSessionsRequest, ...) *DvrSessionIterator
- func (c *Client) ListEvents(ctx context.Context, req *livestreampb.ListEventsRequest, ...) *EventIterator
- func (c *Client) ListInputs(ctx context.Context, req *livestreampb.ListInputsRequest, ...) *InputIterator
- func (c *Client) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, ...) *LocationIterator
- func (c *Client) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, ...) *OperationIterator
- func (c *Client) PreviewInput(ctx context.Context, req *livestreampb.PreviewInputRequest, ...) (*livestreampb.PreviewInputResponse, error)
- func (c *Client) StartChannel(ctx context.Context, req *livestreampb.StartChannelRequest, ...) (*StartChannelOperation, error)
- func (c *Client) StartChannelOperation(name string) *StartChannelOperation
- func (c *Client) StartDistribution(ctx context.Context, req *livestreampb.StartDistributionRequest, ...) (*StartDistributionOperation, error)
- func (c *Client) StartDistributionOperation(name string) *StartDistributionOperation
- func (c *Client) StopChannel(ctx context.Context, req *livestreampb.StopChannelRequest, ...) (*StopChannelOperation, error)
- func (c *Client) StopChannelOperation(name string) *StopChannelOperation
- func (c *Client) StopDistribution(ctx context.Context, req *livestreampb.StopDistributionRequest, ...) (*StopDistributionOperation, error)
- func (c *Client) StopDistributionOperation(name string) *StopDistributionOperation
- func (c *Client) UpdateChannel(ctx context.Context, req *livestreampb.UpdateChannelRequest, ...) (*UpdateChannelOperation, error)
- func (c *Client) UpdateChannelOperation(name string) *UpdateChannelOperation
- func (c *Client) UpdateDvrSession(ctx context.Context, req *livestreampb.UpdateDvrSessionRequest, ...) (*UpdateDvrSessionOperation, error)
- func (c *Client) UpdateDvrSessionOperation(name string) *UpdateDvrSessionOperation
- func (c *Client) UpdateInput(ctx context.Context, req *livestreampb.UpdateInputRequest, ...) (*UpdateInputOperation, error)
- func (c *Client) UpdateInputOperation(name string) *UpdateInputOperation
- func (c *Client) UpdatePool(ctx context.Context, req *livestreampb.UpdatePoolRequest, ...) (*UpdatePoolOperation, error)
- func (c *Client) UpdatePoolOperation(name string) *UpdatePoolOperation
- type ClipIterator
- type CreateAssetOperation
- func (op *CreateAssetOperation) Done() bool
- func (op *CreateAssetOperation) Metadata() (*livestreampb.OperationMetadata, error)
- func (op *CreateAssetOperation) Name() string
- func (op *CreateAssetOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*livestreampb.Asset, error)
- func (op *CreateAssetOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*livestreampb.Asset, error)
- type CreateChannelOperation
- func (op *CreateChannelOperation) Done() bool
- func (op *CreateChannelOperation) Metadata() (*livestreampb.OperationMetadata, error)
- func (op *CreateChannelOperation) Name() string
- func (op *CreateChannelOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*livestreampb.Channel, error)
- func (op *CreateChannelOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*livestreampb.Channel, error)
- type CreateClipOperation
- func (op *CreateClipOperation) Done() bool
- func (op *CreateClipOperation) Metadata() (*livestreampb.OperationMetadata, error)
- func (op *CreateClipOperation) Name() string
- func (op *CreateClipOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*livestreampb.Clip, error)
- func (op *CreateClipOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*livestreampb.Clip, error)
- type CreateDvrSessionOperation
- func (op *CreateDvrSessionOperation) Done() bool
- func (op *CreateDvrSessionOperation) Metadata() (*livestreampb.OperationMetadata, error)
- func (op *CreateDvrSessionOperation) Name() string
- func (op *CreateDvrSessionOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*livestreampb.DvrSession, error)
- func (op *CreateDvrSessionOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*livestreampb.DvrSession, error)
- type CreateInputOperation
- func (op *CreateInputOperation) Done() bool
- func (op *CreateInputOperation) Metadata() (*livestreampb.OperationMetadata, error)
- func (op *CreateInputOperation) Name() string
- func (op *CreateInputOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*livestreampb.Input, error)
- func (op *CreateInputOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*livestreampb.Input, error)
- type DeleteAssetOperation
- func (op *DeleteAssetOperation) Done() bool
- func (op *DeleteAssetOperation) Metadata() (*livestreampb.OperationMetadata, error)
- func (op *DeleteAssetOperation) Name() string
- func (op *DeleteAssetOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteAssetOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteChannelOperation
- func (op *DeleteChannelOperation) Done() bool
- func (op *DeleteChannelOperation) Metadata() (*livestreampb.OperationMetadata, error)
- func (op *DeleteChannelOperation) Name() string
- func (op *DeleteChannelOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteChannelOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteClipOperation
- func (op *DeleteClipOperation) Done() bool
- func (op *DeleteClipOperation) Metadata() (*livestreampb.OperationMetadata, error)
- func (op *DeleteClipOperation) Name() string
- func (op *DeleteClipOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteClipOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteDvrSessionOperation
- func (op *DeleteDvrSessionOperation) Done() bool
- func (op *DeleteDvrSessionOperation) Metadata() (*livestreampb.OperationMetadata, error)
- func (op *DeleteDvrSessionOperation) Name() string
- func (op *DeleteDvrSessionOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteDvrSessionOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteInputOperation
- func (op *DeleteInputOperation) Done() bool
- func (op *DeleteInputOperation) Metadata() (*livestreampb.OperationMetadata, error)
- func (op *DeleteInputOperation) Name() string
- func (op *DeleteInputOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteInputOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DvrSessionIterator
- type EventIterator
- type InputIterator
- type LocationIterator
- type OperationIterator
- type StartChannelOperation
- func (op *StartChannelOperation) Done() bool
- func (op *StartChannelOperation) Metadata() (*livestreampb.OperationMetadata, error)
- func (op *StartChannelOperation) Name() string
- func (op *StartChannelOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*livestreampb.ChannelOperationResponse, error)
- func (op *StartChannelOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*livestreampb.ChannelOperationResponse, error)
- type StartDistributionOperation
- func (op *StartDistributionOperation) Done() bool
- func (op *StartDistributionOperation) Metadata() (*livestreampb.OperationMetadata, error)
- func (op *StartDistributionOperation) Name() string
- func (op *StartDistributionOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*livestreampb.ChannelOperationResponse, error)
- func (op *StartDistributionOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*livestreampb.ChannelOperationResponse, error)
- type StopChannelOperation
- func (op *StopChannelOperation) Done() bool
- func (op *StopChannelOperation) Metadata() (*livestreampb.OperationMetadata, error)
- func (op *StopChannelOperation) Name() string
- func (op *StopChannelOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*livestreampb.ChannelOperationResponse, error)
- func (op *StopChannelOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*livestreampb.ChannelOperationResponse, error)
- type StopDistributionOperation
- func (op *StopDistributionOperation) Done() bool
- func (op *StopDistributionOperation) Metadata() (*livestreampb.OperationMetadata, error)
- func (op *StopDistributionOperation) Name() string
- func (op *StopDistributionOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*livestreampb.ChannelOperationResponse, error)
- func (op *StopDistributionOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*livestreampb.ChannelOperationResponse, error)
- type UpdateChannelOperation
- func (op *UpdateChannelOperation) Done() bool
- func (op *UpdateChannelOperation) Metadata() (*livestreampb.OperationMetadata, error)
- func (op *UpdateChannelOperation) Name() string
- func (op *UpdateChannelOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*livestreampb.Channel, error)
- func (op *UpdateChannelOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*livestreampb.Channel, error)
- type UpdateDvrSessionOperation
- func (op *UpdateDvrSessionOperation) Done() bool
- func (op *UpdateDvrSessionOperation) Metadata() (*livestreampb.OperationMetadata, error)
- func (op *UpdateDvrSessionOperation) Name() string
- func (op *UpdateDvrSessionOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*livestreampb.DvrSession, error)
- func (op *UpdateDvrSessionOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*livestreampb.DvrSession, error)
- type UpdateInputOperation
- func (op *UpdateInputOperation) Done() bool
- func (op *UpdateInputOperation) Metadata() (*livestreampb.OperationMetadata, error)
- func (op *UpdateInputOperation) Name() string
- func (op *UpdateInputOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*livestreampb.Input, error)
- func (op *UpdateInputOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*livestreampb.Input, error)
- type UpdatePoolOperation
- func (op *UpdatePoolOperation) Done() bool
- func (op *UpdatePoolOperation) Metadata() (*livestreampb.OperationMetadata, error)
- func (op *UpdatePoolOperation) Name() string
- func (op *UpdatePoolOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*livestreampb.Pool, error)
- func (op *UpdatePoolOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*livestreampb.Pool, error)
Examples ¶
- Client.CancelOperation
- Client.CreateAsset
- Client.CreateChannel
- Client.CreateClip
- Client.CreateDvrSession
- Client.CreateEvent
- Client.CreateInput
- Client.DeleteAsset
- Client.DeleteChannel
- Client.DeleteClip
- Client.DeleteDvrSession
- Client.DeleteEvent
- Client.DeleteInput
- Client.DeleteOperation
- Client.GetAsset
- Client.GetChannel
- Client.GetClip
- Client.GetDvrSession
- Client.GetEvent
- Client.GetInput
- Client.GetLocation
- Client.GetOperation
- Client.GetPool
- Client.ListAssets
- Client.ListAssets (All)
- Client.ListChannels
- Client.ListChannels (All)
- Client.ListClips
- Client.ListClips (All)
- Client.ListDvrSessions
- Client.ListDvrSessions (All)
- Client.ListEvents
- Client.ListEvents (All)
- Client.ListInputs
- Client.ListInputs (All)
- Client.ListLocations
- Client.ListLocations (All)
- Client.ListOperations
- Client.ListOperations (All)
- Client.PreviewInput
- Client.StartChannel
- Client.StartDistribution
- Client.StopChannel
- Client.StopDistribution
- Client.UpdateChannel
- Client.UpdateDvrSession
- Client.UpdateInput
- Client.UpdatePool
- NewClient
- NewRESTClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultAuthScopes ¶
func DefaultAuthScopes() []string
DefaultAuthScopes reports the default set of authentication scopes to use with this package.
Types ¶
type AssetIterator ¶ added in v1.19.0
type AssetIterator 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.Asset, nextPageToken string, err error)
// contains filtered or unexported fields
}
AssetIterator manages a stream of *livestreampb.Asset.
func (*AssetIterator) All ¶ added in v1.23.1
func (it *AssetIterator) All() iter.Seq2[*livestreampb.Asset, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*AssetIterator) Next ¶ added in v1.19.0
func (it *AssetIterator) Next() (*livestreampb.Asset, 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 (*AssetIterator) PageInfo ¶ added in v1.19.0
func (it *AssetIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type 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
StartDistribution []gax.CallOption
StopDistribution []gax.CallOption
CreateInput []gax.CallOption
ListInputs []gax.CallOption
GetInput []gax.CallOption
DeleteInput []gax.CallOption
UpdateInput []gax.CallOption
PreviewInput []gax.CallOption
CreateEvent []gax.CallOption
ListEvents []gax.CallOption
GetEvent []gax.CallOption
DeleteEvent []gax.CallOption
ListClips []gax.CallOption
GetClip []gax.CallOption
CreateClip []gax.CallOption
DeleteClip []gax.CallOption
CreateDvrSession []gax.CallOption
ListDvrSessions []gax.CallOption
GetDvrSession []gax.CallOption
DeleteDvrSession []gax.CallOption
UpdateDvrSession []gax.CallOption
CreateAsset []gax.CallOption
DeleteAsset []gax.CallOption
GetAsset []gax.CallOption
ListAssets []gax.CallOption
GetPool []gax.CallOption
UpdatePool []gax.CallOption
GetLocation []gax.CallOption
ListLocations []gax.CallOption
CancelOperation []gax.CallOption
DeleteOperation []gax.CallOption
GetOperation []gax.CallOption
ListOperations []gax.CallOption
}
CallOptions contains the retry settings for each method of Client.
type 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) All ¶ added in v1.23.1
func (it *ChannelIterator) All() iter.Seq2[*livestreampb.Channel, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
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.
type 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 ¶
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 (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := livestream.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func NewRESTClient ¶ added in v1.12.0
NewRESTClient creates a new livestream service rest client.
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 (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := livestream.NewRESTClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*Client) CancelOperation ¶ added in v1.14.0
func (c *Client) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
livestream "cloud.google.com/go/video/livestream/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := livestream.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.CancelOperationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest.
}
err = c.CancelOperation(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) Close ¶
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*Client) Connection
deprecated
func (c *Client) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*Client) CreateAsset ¶ added in v1.19.0
func (c *Client) CreateAsset(ctx context.Context, req *livestreampb.CreateAssetRequest, opts ...gax.CallOption) (*CreateAssetOperation, error)
CreateAsset creates a Asset with the provided unique ID in the specified region.
Example ¶
package main
import (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
livestreampb "cloud.google.com/go/video/livestream/apiv1/livestreampb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := livestream.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &livestreampb.CreateAssetRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/video/livestream/apiv1/livestreampb#CreateAssetRequest.
}
op, err := c.CreateAsset(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) CreateAssetOperation ¶ added in v1.19.0
func (c *Client) CreateAssetOperation(name string) *CreateAssetOperation
CreateAssetOperation returns a new CreateAssetOperation from a given name. The name must be that of a previously created CreateAssetOperation, possibly from a different process.
func (*Client) CreateChannel ¶
func (c *Client) CreateChannel(ctx context.Context, req *livestreampb.CreateChannelRequest, opts ...gax.CallOption) (*CreateChannelOperation, error)
CreateChannel creates a channel with the provided unique ID in the specified region.
Example ¶
package main
import (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
livestreampb "cloud.google.com/go/video/livestream/apiv1/livestreampb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
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/cloud.google.com/go/video/livestream/apiv1/livestreampb#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) CreateClip ¶ added in v1.22.0
func (c *Client) CreateClip(ctx context.Context, req *livestreampb.CreateClipRequest, opts ...gax.CallOption) (*CreateClipOperation, error)
CreateClip creates a clip with the provided clip ID in the specified channel.
Example ¶
package main
import (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
livestreampb "cloud.google.com/go/video/livestream/apiv1/livestreampb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := livestream.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &livestreampb.CreateClipRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/video/livestream/apiv1/livestreampb#CreateClipRequest.
}
op, err := c.CreateClip(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) CreateClipOperation ¶ added in v1.22.0
func (c *Client) CreateClipOperation(name string) *CreateClipOperation
CreateClipOperation returns a new CreateClipOperation from a given name. The name must be that of a previously created CreateClipOperation, possibly from a different process.
func (*Client) CreateDvrSession ¶ added in v1.24.0
func (c *Client) CreateDvrSession(ctx context.Context, req *livestreampb.CreateDvrSessionRequest, opts ...gax.CallOption) (*CreateDvrSessionOperation, error)
CreateDvrSession creates a DVR session with the provided unique ID in the specified channel.
Example ¶
package main
import (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
livestreampb "cloud.google.com/go/video/livestream/apiv1/livestreampb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := livestream.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &livestreampb.CreateDvrSessionRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/video/livestream/apiv1/livestreampb#CreateDvrSessionRequest.
}
op, err := c.CreateDvrSession(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) CreateDvrSessionOperation ¶ added in v1.24.0
func (c *Client) CreateDvrSessionOperation(name string) *CreateDvrSessionOperation
CreateDvrSessionOperation returns a new CreateDvrSessionOperation from a given name. The name must be that of a previously created CreateDvrSessionOperation, 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 (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
livestreampb "cloud.google.com/go/video/livestream/apiv1/livestreampb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
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/cloud.google.com/go/video/livestream/apiv1/livestreampb#CreateEventRequest.
}
resp, err := c.CreateEvent(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) CreateInput ¶
func (c *Client) CreateInput(ctx context.Context, req *livestreampb.CreateInputRequest, opts ...gax.CallOption) (*CreateInputOperation, error)
CreateInput creates an input with the provided unique ID in the specified region.
Example ¶
package main
import (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
livestreampb "cloud.google.com/go/video/livestream/apiv1/livestreampb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
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/cloud.google.com/go/video/livestream/apiv1/livestreampb#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) DeleteAsset ¶ added in v1.19.0
func (c *Client) DeleteAsset(ctx context.Context, req *livestreampb.DeleteAssetRequest, opts ...gax.CallOption) (*DeleteAssetOperation, error)
DeleteAsset deletes the specified asset if it is not used.
Example ¶
package main
import (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
livestreampb "cloud.google.com/go/video/livestream/apiv1/livestreampb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := livestream.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &livestreampb.DeleteAssetRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/video/livestream/apiv1/livestreampb#DeleteAssetRequest.
}
op, err := c.DeleteAsset(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteAssetOperation ¶ added in v1.19.0
func (c *Client) DeleteAssetOperation(name string) *DeleteAssetOperation
DeleteAssetOperation returns a new DeleteAssetOperation from a given name. The name must be that of a previously created DeleteAssetOperation, possibly from a different process.
func (*Client) DeleteChannel ¶
func (c *Client) DeleteChannel(ctx context.Context, req *livestreampb.DeleteChannelRequest, opts ...gax.CallOption) (*DeleteChannelOperation, error)
DeleteChannel deletes the specified channel.
Example ¶
package main
import (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
livestreampb "cloud.google.com/go/video/livestream/apiv1/livestreampb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
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/cloud.google.com/go/video/livestream/apiv1/livestreampb#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) DeleteClip ¶ added in v1.22.0
func (c *Client) DeleteClip(ctx context.Context, req *livestreampb.DeleteClipRequest, opts ...gax.CallOption) (*DeleteClipOperation, error)
DeleteClip deletes the specified clip job resource. This method only deletes the clip job and does not delete the VOD clip stored in Cloud Storage.
Example ¶
package main
import (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
livestreampb "cloud.google.com/go/video/livestream/apiv1/livestreampb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := livestream.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &livestreampb.DeleteClipRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/video/livestream/apiv1/livestreampb#DeleteClipRequest.
}
op, err := c.DeleteClip(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteClipOperation ¶ added in v1.22.0
func (c *Client) DeleteClipOperation(name string) *DeleteClipOperation
DeleteClipOperation returns a new DeleteClipOperation from a given name. The name must be that of a previously created DeleteClipOperation, possibly from a different process.
func (*Client) DeleteDvrSession ¶ added in v1.24.0
func (c *Client) DeleteDvrSession(ctx context.Context, req *livestreampb.DeleteDvrSessionRequest, opts ...gax.CallOption) (*DeleteDvrSessionOperation, error)
DeleteDvrSession deletes the specified DVR session.
Example ¶
package main
import (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
livestreampb "cloud.google.com/go/video/livestream/apiv1/livestreampb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := livestream.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &livestreampb.DeleteDvrSessionRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/video/livestream/apiv1/livestreampb#DeleteDvrSessionRequest.
}
op, err := c.DeleteDvrSession(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteDvrSessionOperation ¶ added in v1.24.0
func (c *Client) DeleteDvrSessionOperation(name string) *DeleteDvrSessionOperation
DeleteDvrSessionOperation returns a new DeleteDvrSessionOperation from a given name. The name must be that of a previously created DeleteDvrSessionOperation, 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 (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
livestreampb "cloud.google.com/go/video/livestream/apiv1/livestreampb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
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/cloud.google.com/go/video/livestream/apiv1/livestreampb#DeleteEventRequest.
}
err = c.DeleteEvent(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteInput ¶
func (c *Client) DeleteInput(ctx context.Context, req *livestreampb.DeleteInputRequest, opts ...gax.CallOption) (*DeleteInputOperation, error)
DeleteInput deletes the specified input.
Example ¶
package main
import (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
livestreampb "cloud.google.com/go/video/livestream/apiv1/livestreampb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
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/cloud.google.com/go/video/livestream/apiv1/livestreampb#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) DeleteOperation ¶ added in v1.14.0
func (c *Client) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
livestream "cloud.google.com/go/video/livestream/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := livestream.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.DeleteOperationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest.
}
err = c.DeleteOperation(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) GetAsset ¶ added in v1.19.0
func (c *Client) GetAsset(ctx context.Context, req *livestreampb.GetAssetRequest, opts ...gax.CallOption) (*livestreampb.Asset, error)
GetAsset returns the specified asset.
Example ¶
package main
import (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
livestreampb "cloud.google.com/go/video/livestream/apiv1/livestreampb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := livestream.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &livestreampb.GetAssetRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/video/livestream/apiv1/livestreampb#GetAssetRequest.
}
resp, err := c.GetAsset(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetChannel ¶
func (c *Client) GetChannel(ctx context.Context, req *livestreampb.GetChannelRequest, opts ...gax.CallOption) (*livestreampb.Channel, error)
GetChannel returns the specified channel.
Example ¶
package main
import (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
livestreampb "cloud.google.com/go/video/livestream/apiv1/livestreampb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
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/cloud.google.com/go/video/livestream/apiv1/livestreampb#GetChannelRequest.
}
resp, err := c.GetChannel(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetClip ¶ added in v1.22.0
func (c *Client) GetClip(ctx context.Context, req *livestreampb.GetClipRequest, opts ...gax.CallOption) (*livestreampb.Clip, error)
GetClip returns the specified clip.
Example ¶
package main
import (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
livestreampb "cloud.google.com/go/video/livestream/apiv1/livestreampb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := livestream.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &livestreampb.GetClipRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/video/livestream/apiv1/livestreampb#GetClipRequest.
}
resp, err := c.GetClip(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetDvrSession ¶ added in v1.24.0
func (c *Client) GetDvrSession(ctx context.Context, req *livestreampb.GetDvrSessionRequest, opts ...gax.CallOption) (*livestreampb.DvrSession, error)
GetDvrSession returns the specified DVR session.
Example ¶
package main
import (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
livestreampb "cloud.google.com/go/video/livestream/apiv1/livestreampb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := livestream.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &livestreampb.GetDvrSessionRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/video/livestream/apiv1/livestreampb#GetDvrSessionRequest.
}
resp, err := c.GetDvrSession(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetEvent ¶
func (c *Client) GetEvent(ctx context.Context, req *livestreampb.GetEventRequest, opts ...gax.CallOption) (*livestreampb.Event, error)
GetEvent returns the specified event.
Example ¶
package main
import (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
livestreampb "cloud.google.com/go/video/livestream/apiv1/livestreampb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
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/cloud.google.com/go/video/livestream/apiv1/livestreampb#GetEventRequest.
}
resp, err := c.GetEvent(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetInput ¶
func (c *Client) GetInput(ctx context.Context, req *livestreampb.GetInputRequest, opts ...gax.CallOption) (*livestreampb.Input, error)
GetInput returns the specified input.
Example ¶
package main
import (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
livestreampb "cloud.google.com/go/video/livestream/apiv1/livestreampb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
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/cloud.google.com/go/video/livestream/apiv1/livestreampb#GetInputRequest.
}
resp, err := c.GetInput(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetLocation ¶ added in v1.14.0
func (c *Client) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error)
GetLocation gets information about a location.
Example ¶
package main
import (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
locationpb "google.golang.org/genproto/googleapis/cloud/location"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := livestream.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &locationpb.GetLocationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest.
}
resp, err := c.GetLocation(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetOperation ¶ added in v1.14.0
func (c *Client) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error)
GetOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
livestream "cloud.google.com/go/video/livestream/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := livestream.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.GetOperationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest.
}
resp, err := c.GetOperation(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetPool ¶ added in v1.19.0
func (c *Client) GetPool(ctx context.Context, req *livestreampb.GetPoolRequest, opts ...gax.CallOption) (*livestreampb.Pool, error)
GetPool returns the specified pool.
Example ¶
package main
import (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
livestreampb "cloud.google.com/go/video/livestream/apiv1/livestreampb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := livestream.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &livestreampb.GetPoolRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/video/livestream/apiv1/livestreampb#GetPoolRequest.
}
resp, err := c.GetPool(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) ListAssets ¶ added in v1.19.0
func (c *Client) ListAssets(ctx context.Context, req *livestreampb.ListAssetsRequest, opts ...gax.CallOption) *AssetIterator
ListAssets returns a list of all assets in the specified region.
Example ¶
package main
import (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
livestreampb "cloud.google.com/go/video/livestream/apiv1/livestreampb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := livestream.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &livestreampb.ListAssetsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/video/livestream/apiv1/livestreampb#ListAssetsRequest.
}
it := c.ListAssets(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*livestreampb.ListAssetsResponse)
}
}
Example (All) ¶
package main
import (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
livestreampb "cloud.google.com/go/video/livestream/apiv1/livestreampb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := livestream.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &livestreampb.ListAssetsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/video/livestream/apiv1/livestreampb#ListAssetsRequest.
}
for resp, err := range c.ListAssets(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any 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 (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
livestreampb "cloud.google.com/go/video/livestream/apiv1/livestreampb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
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/cloud.google.com/go/video/livestream/apiv1/livestreampb#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
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*livestreampb.ListChannelsResponse)
}
}
Example (All) ¶
package main
import (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
livestreampb "cloud.google.com/go/video/livestream/apiv1/livestreampb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
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/cloud.google.com/go/video/livestream/apiv1/livestreampb#ListChannelsRequest.
}
for resp, err := range c.ListChannels(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) ListClips ¶ added in v1.22.0
func (c *Client) ListClips(ctx context.Context, req *livestreampb.ListClipsRequest, opts ...gax.CallOption) *ClipIterator
ListClips returns a list of all clips in the specified channel.
Example ¶
package main
import (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
livestreampb "cloud.google.com/go/video/livestream/apiv1/livestreampb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := livestream.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &livestreampb.ListClipsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/video/livestream/apiv1/livestreampb#ListClipsRequest.
}
it := c.ListClips(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*livestreampb.ListClipsResponse)
}
}
Example (All) ¶
package main
import (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
livestreampb "cloud.google.com/go/video/livestream/apiv1/livestreampb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := livestream.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &livestreampb.ListClipsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/video/livestream/apiv1/livestreampb#ListClipsRequest.
}
for resp, err := range c.ListClips(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) ListDvrSessions ¶ added in v1.24.0
func (c *Client) ListDvrSessions(ctx context.Context, req *livestreampb.ListDvrSessionsRequest, opts ...gax.CallOption) *DvrSessionIterator
ListDvrSessions returns a list of all DVR sessions in the specified channel.
Example ¶
package main
import (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
livestreampb "cloud.google.com/go/video/livestream/apiv1/livestreampb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := livestream.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &livestreampb.ListDvrSessionsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/video/livestream/apiv1/livestreampb#ListDvrSessionsRequest.
}
it := c.ListDvrSessions(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*livestreampb.ListDvrSessionsResponse)
}
}
Example (All) ¶
package main
import (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
livestreampb "cloud.google.com/go/video/livestream/apiv1/livestreampb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := livestream.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &livestreampb.ListDvrSessionsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/video/livestream/apiv1/livestreampb#ListDvrSessionsRequest.
}
for resp, err := range c.ListDvrSessions(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any 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 (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
livestreampb "cloud.google.com/go/video/livestream/apiv1/livestreampb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
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/cloud.google.com/go/video/livestream/apiv1/livestreampb#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
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*livestreampb.ListEventsResponse)
}
}
Example (All) ¶
package main
import (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
livestreampb "cloud.google.com/go/video/livestream/apiv1/livestreampb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
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/cloud.google.com/go/video/livestream/apiv1/livestreampb#ListEventsRequest.
}
for resp, err := range c.ListEvents(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any 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 (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
livestreampb "cloud.google.com/go/video/livestream/apiv1/livestreampb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
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/cloud.google.com/go/video/livestream/apiv1/livestreampb#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
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*livestreampb.ListInputsResponse)
}
}
Example (All) ¶
package main
import (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
livestreampb "cloud.google.com/go/video/livestream/apiv1/livestreampb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
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/cloud.google.com/go/video/livestream/apiv1/livestreampb#ListInputsRequest.
}
for resp, err := range c.ListInputs(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) ListLocations ¶ added in v1.14.0
func (c *Client) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator
ListLocations lists information about the supported locations for this service.
Example ¶
package main
import (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
"google.golang.org/api/iterator"
locationpb "google.golang.org/genproto/googleapis/cloud/location"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := livestream.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &locationpb.ListLocationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
}
it := c.ListLocations(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*locationpb.ListLocationsResponse)
}
}
Example (All) ¶
package main
import (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
locationpb "google.golang.org/genproto/googleapis/cloud/location"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := livestream.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &locationpb.ListLocationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
}
for resp, err := range c.ListLocations(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) ListOperations ¶ added in v1.14.0
func (c *Client) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
livestream "cloud.google.com/go/video/livestream/apiv1"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := livestream.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.ListOperationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
}
it := c.ListOperations(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*longrunningpb.ListOperationsResponse)
}
}
Example (All) ¶
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
livestream "cloud.google.com/go/video/livestream/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := livestream.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.ListOperationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
}
for resp, err := range c.ListOperations(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) PreviewInput ¶ added in v1.27.0
func (c *Client) PreviewInput(ctx context.Context, req *livestreampb.PreviewInputRequest, opts ...gax.CallOption) (*livestreampb.PreviewInputResponse, error)
PreviewInput preview the streaming content of the specified input.
Example ¶
package main
import (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
livestreampb "cloud.google.com/go/video/livestream/apiv1/livestreampb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := livestream.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &livestreampb.PreviewInputRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/video/livestream/apiv1/livestreampb#PreviewInputRequest.
}
resp, err := c.PreviewInput(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) StartChannel ¶
func (c *Client) StartChannel(ctx context.Context, req *livestreampb.StartChannelRequest, opts ...gax.CallOption) (*StartChannelOperation, error)
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 (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
livestreampb "cloud.google.com/go/video/livestream/apiv1/livestreampb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
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/cloud.google.com/go/video/livestream/apiv1/livestreampb#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) StartDistribution ¶ added in v1.27.0
func (c *Client) StartDistribution(ctx context.Context, req *livestreampb.StartDistributionRequest, opts ...gax.CallOption) (*StartDistributionOperation, error)
StartDistribution starts distribution which delivers outputs to the destination indicated by the Distribution configuration.
Example ¶
package main
import (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
livestreampb "cloud.google.com/go/video/livestream/apiv1/livestreampb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := livestream.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &livestreampb.StartDistributionRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/video/livestream/apiv1/livestreampb#StartDistributionRequest.
}
op, err := c.StartDistribution(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) StartDistributionOperation ¶ added in v1.27.0
func (c *Client) StartDistributionOperation(name string) *StartDistributionOperation
StartDistributionOperation returns a new StartDistributionOperation from a given name. The name must be that of a previously created StartDistributionOperation, possibly from a different process.
func (*Client) StopChannel ¶
func (c *Client) StopChannel(ctx context.Context, req *livestreampb.StopChannelRequest, opts ...gax.CallOption) (*StopChannelOperation, error)
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 (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
livestreampb "cloud.google.com/go/video/livestream/apiv1/livestreampb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
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/cloud.google.com/go/video/livestream/apiv1/livestreampb#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) StopDistribution ¶ added in v1.27.0
func (c *Client) StopDistribution(ctx context.Context, req *livestreampb.StopDistributionRequest, opts ...gax.CallOption) (*StopDistributionOperation, error)
StopDistribution stops the specified distribution.
Example ¶
package main
import (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
livestreampb "cloud.google.com/go/video/livestream/apiv1/livestreampb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := livestream.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &livestreampb.StopDistributionRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/video/livestream/apiv1/livestreampb#StopDistributionRequest.
}
op, err := c.StopDistribution(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) StopDistributionOperation ¶ added in v1.27.0
func (c *Client) StopDistributionOperation(name string) *StopDistributionOperation
StopDistributionOperation returns a new StopDistributionOperation from a given name. The name must be that of a previously created StopDistributionOperation, possibly from a different process.
func (*Client) UpdateChannel ¶
func (c *Client) UpdateChannel(ctx context.Context, req *livestreampb.UpdateChannelRequest, opts ...gax.CallOption) (*UpdateChannelOperation, error)
UpdateChannel updates the specified channel.
Example ¶
package main
import (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
livestreampb "cloud.google.com/go/video/livestream/apiv1/livestreampb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
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/cloud.google.com/go/video/livestream/apiv1/livestreampb#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) UpdateDvrSession ¶ added in v1.24.0
func (c *Client) UpdateDvrSession(ctx context.Context, req *livestreampb.UpdateDvrSessionRequest, opts ...gax.CallOption) (*UpdateDvrSessionOperation, error)
UpdateDvrSession updates the specified DVR session.
Example ¶
package main
import (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
livestreampb "cloud.google.com/go/video/livestream/apiv1/livestreampb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := livestream.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &livestreampb.UpdateDvrSessionRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/video/livestream/apiv1/livestreampb#UpdateDvrSessionRequest.
}
op, err := c.UpdateDvrSession(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) UpdateDvrSessionOperation ¶ added in v1.24.0
func (c *Client) UpdateDvrSessionOperation(name string) *UpdateDvrSessionOperation
UpdateDvrSessionOperation returns a new UpdateDvrSessionOperation from a given name. The name must be that of a previously created UpdateDvrSessionOperation, possibly from a different process.
func (*Client) UpdateInput ¶
func (c *Client) UpdateInput(ctx context.Context, req *livestreampb.UpdateInputRequest, opts ...gax.CallOption) (*UpdateInputOperation, error)
UpdateInput updates the specified input.
Example ¶
package main
import (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
livestreampb "cloud.google.com/go/video/livestream/apiv1/livestreampb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
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/cloud.google.com/go/video/livestream/apiv1/livestreampb#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.
func (*Client) UpdatePool ¶ added in v1.19.0
func (c *Client) UpdatePool(ctx context.Context, req *livestreampb.UpdatePoolRequest, opts ...gax.CallOption) (*UpdatePoolOperation, error)
UpdatePool updates the specified pool.
Example ¶
package main
import (
"context"
livestream "cloud.google.com/go/video/livestream/apiv1"
livestreampb "cloud.google.com/go/video/livestream/apiv1/livestreampb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := livestream.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &livestreampb.UpdatePoolRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/video/livestream/apiv1/livestreampb#UpdatePoolRequest.
}
op, err := c.UpdatePool(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) UpdatePoolOperation ¶ added in v1.19.0
func (c *Client) UpdatePoolOperation(name string) *UpdatePoolOperation
UpdatePoolOperation returns a new UpdatePoolOperation from a given name. The name must be that of a previously created UpdatePoolOperation, possibly from a different process.
type ClipIterator ¶ added in v1.22.0
type ClipIterator 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.Clip, nextPageToken string, err error)
// contains filtered or unexported fields
}
ClipIterator manages a stream of *livestreampb.Clip.
func (*ClipIterator) All ¶ added in v1.23.1
func (it *ClipIterator) All() iter.Seq2[*livestreampb.Clip, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*ClipIterator) Next ¶ added in v1.22.0
func (it *ClipIterator) Next() (*livestreampb.Clip, 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 (*ClipIterator) PageInfo ¶ added in v1.22.0
func (it *ClipIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type CreateAssetOperation ¶ added in v1.19.0
type CreateAssetOperation struct {
// contains filtered or unexported fields
}
CreateAssetOperation manages a long-running operation from CreateAsset.
func (*CreateAssetOperation) Done ¶ added in v1.19.0
func (op *CreateAssetOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateAssetOperation) Metadata ¶ added in v1.19.0
func (op *CreateAssetOperation) Metadata() (*livestreampb.OperationMetadata, error)
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 (*CreateAssetOperation) Name ¶ added in v1.19.0
func (op *CreateAssetOperation) 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 (*CreateAssetOperation) Poll ¶ added in v1.19.0
func (op *CreateAssetOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*livestreampb.Asset, 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 (*CreateAssetOperation) Wait ¶ added in v1.19.0
func (op *CreateAssetOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*livestreampb.Asset, 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.
type 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 ¶
func (op *CreateChannelOperation) Metadata() (*livestreampb.OperationMetadata, error)
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 ¶
func (op *CreateChannelOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*livestreampb.Channel, 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 (*CreateChannelOperation) Wait ¶
func (op *CreateChannelOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*livestreampb.Channel, 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.
type CreateClipOperation ¶ added in v1.22.0
type CreateClipOperation struct {
// contains filtered or unexported fields
}
CreateClipOperation manages a long-running operation from CreateClip.
func (*CreateClipOperation) Done ¶ added in v1.22.0
func (op *CreateClipOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateClipOperation) Metadata ¶ added in v1.22.0
func (op *CreateClipOperation) Metadata() (*livestreampb.OperationMetadata, error)
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 (*CreateClipOperation) Name ¶ added in v1.22.0
func (op *CreateClipOperation) 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 (*CreateClipOperation) Poll ¶ added in v1.22.0
func (op *CreateClipOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*livestreampb.Clip, 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 (*CreateClipOperation) Wait ¶ added in v1.22.0
func (op *CreateClipOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*livestreampb.Clip, 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.
type CreateDvrSessionOperation ¶ added in v1.24.0
type CreateDvrSessionOperation struct {
// contains filtered or unexported fields
}
CreateDvrSessionOperation manages a long-running operation from CreateDvrSession.
func (*CreateDvrSessionOperation) Done ¶ added in v1.24.0
func (op *CreateDvrSessionOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateDvrSessionOperation) Metadata ¶ added in v1.24.0
func (op *CreateDvrSessionOperation) Metadata() (*livestreampb.OperationMetadata, error)
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 (*CreateDvrSessionOperation) Name ¶ added in v1.24.0
func (op *CreateDvrSessionOperation) 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 (*CreateDvrSessionOperation) Poll ¶ added in v1.24.0
func (op *CreateDvrSessionOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*livestreampb.DvrSession, 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 (*CreateDvrSessionOperation) Wait ¶ added in v1.24.0
func (op *CreateDvrSessionOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*livestreampb.DvrSession, 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.
type 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 ¶
func (op *CreateInputOperation) Metadata() (*livestreampb.OperationMetadata, error)
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 ¶
func (op *CreateInputOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*livestreampb.Input, 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 (*CreateInputOperation) Wait ¶
func (op *CreateInputOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*livestreampb.Input, 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.
type DeleteAssetOperation ¶ added in v1.19.0
type DeleteAssetOperation struct {
// contains filtered or unexported fields
}
DeleteAssetOperation manages a long-running operation from DeleteAsset.
func (*DeleteAssetOperation) Done ¶ added in v1.19.0
func (op *DeleteAssetOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteAssetOperation) Metadata ¶ added in v1.19.0
func (op *DeleteAssetOperation) Metadata() (*livestreampb.OperationMetadata, error)
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 (*DeleteAssetOperation) Name ¶ added in v1.19.0
func (op *DeleteAssetOperation) 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 (*DeleteAssetOperation) Poll ¶ added in v1.19.0
func (op *DeleteAssetOperation) 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 (*DeleteAssetOperation) Wait ¶ added in v1.19.0
func (op *DeleteAssetOperation) 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.
type 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 ¶
func (op *DeleteChannelOperation) Metadata() (*livestreampb.OperationMetadata, error)
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.
type DeleteClipOperation ¶ added in v1.22.0
type DeleteClipOperation struct {
// contains filtered or unexported fields
}
DeleteClipOperation manages a long-running operation from DeleteClip.
func (*DeleteClipOperation) Done ¶ added in v1.22.0
func (op *DeleteClipOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteClipOperation) Metadata ¶ added in v1.22.0
func (op *DeleteClipOperation) Metadata() (*livestreampb.OperationMetadata, error)
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 (*DeleteClipOperation) Name ¶ added in v1.22.0
func (op *DeleteClipOperation) 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 (*DeleteClipOperation) Poll ¶ added in v1.22.0
func (op *DeleteClipOperation) 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 (*DeleteClipOperation) Wait ¶ added in v1.22.0
func (op *DeleteClipOperation) 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.
type DeleteDvrSessionOperation ¶ added in v1.24.0
type DeleteDvrSessionOperation struct {
// contains filtered or unexported fields
}
DeleteDvrSessionOperation manages a long-running operation from DeleteDvrSession.
func (*DeleteDvrSessionOperation) Done ¶ added in v1.24.0
func (op *DeleteDvrSessionOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteDvrSessionOperation) Metadata ¶ added in v1.24.0
func (op *DeleteDvrSessionOperation) Metadata() (*livestreampb.OperationMetadata, error)
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 (*DeleteDvrSessionOperation) Name ¶ added in v1.24.0
func (op *DeleteDvrSessionOperation) 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 (*DeleteDvrSessionOperation) Poll ¶ added in v1.24.0
func (op *DeleteDvrSessionOperation) 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 (*DeleteDvrSessionOperation) Wait ¶ added in v1.24.0
func (op *DeleteDvrSessionOperation) 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.
type 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 ¶
func (op *DeleteInputOperation) Metadata() (*livestreampb.OperationMetadata, error)
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.
type DvrSessionIterator ¶ added in v1.24.0
type DvrSessionIterator 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.DvrSession, nextPageToken string, err error)
// contains filtered or unexported fields
}
DvrSessionIterator manages a stream of *livestreampb.DvrSession.
func (*DvrSessionIterator) All ¶ added in v1.24.0
func (it *DvrSessionIterator) All() iter.Seq2[*livestreampb.DvrSession, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*DvrSessionIterator) Next ¶ added in v1.24.0
func (it *DvrSessionIterator) Next() (*livestreampb.DvrSession, 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 (*DvrSessionIterator) PageInfo ¶ added in v1.24.0
func (it *DvrSessionIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type 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) All ¶ added in v1.23.1
func (it *EventIterator) All() iter.Seq2[*livestreampb.Event, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
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.
type 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) All ¶ added in v1.23.1
func (it *InputIterator) All() iter.Seq2[*livestreampb.Input, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
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.
type LocationIterator ¶ added in v1.14.0
type LocationIterator 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 []*locationpb.Location, nextPageToken string, err error)
// contains filtered or unexported fields
}
LocationIterator manages a stream of *locationpb.Location.
func (*LocationIterator) All ¶ added in v1.23.1
func (it *LocationIterator) All() iter.Seq2[*locationpb.Location, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*LocationIterator) Next ¶ added in v1.14.0
func (it *LocationIterator) Next() (*locationpb.Location, 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 (*LocationIterator) PageInfo ¶ added in v1.14.0
func (it *LocationIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type OperationIterator ¶ added in v1.14.0
type OperationIterator 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 []*longrunningpb.Operation, nextPageToken string, err error)
// contains filtered or unexported fields
}
OperationIterator manages a stream of *longrunningpb.Operation.
func (*OperationIterator) All ¶ added in v1.23.1
func (it *OperationIterator) All() iter.Seq2[*longrunningpb.Operation, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*OperationIterator) Next ¶ added in v1.14.0
func (it *OperationIterator) Next() (*longrunningpb.Operation, 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 (*OperationIterator) PageInfo ¶ added in v1.14.0
func (it *OperationIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type 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 ¶
func (op *StartChannelOperation) Metadata() (*livestreampb.OperationMetadata, error)
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 ¶
func (op *StartChannelOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*livestreampb.ChannelOperationResponse, 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 (*StartChannelOperation) Wait ¶
func (op *StartChannelOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*livestreampb.ChannelOperationResponse, 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.
type StartDistributionOperation ¶ added in v1.27.0
type StartDistributionOperation struct {
// contains filtered or unexported fields
}
StartDistributionOperation manages a long-running operation from StartDistribution.
func (*StartDistributionOperation) Done ¶ added in v1.27.0
func (op *StartDistributionOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*StartDistributionOperation) Metadata ¶ added in v1.27.0
func (op *StartDistributionOperation) Metadata() (*livestreampb.OperationMetadata, error)
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 (*StartDistributionOperation) Name ¶ added in v1.27.0
func (op *StartDistributionOperation) 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 (*StartDistributionOperation) Poll ¶ added in v1.27.0
func (op *StartDistributionOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*livestreampb.ChannelOperationResponse, 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 (*StartDistributionOperation) Wait ¶ added in v1.27.0
func (op *StartDistributionOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*livestreampb.ChannelOperationResponse, 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.
type 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 ¶
func (op *StopChannelOperation) Metadata() (*livestreampb.OperationMetadata, error)
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 ¶
func (op *StopChannelOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*livestreampb.ChannelOperationResponse, 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 (*StopChannelOperation) Wait ¶
func (op *StopChannelOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*livestreampb.ChannelOperationResponse, 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.
type StopDistributionOperation ¶ added in v1.27.0
type StopDistributionOperation struct {
// contains filtered or unexported fields
}
StopDistributionOperation manages a long-running operation from StopDistribution.
func (*StopDistributionOperation) Done ¶ added in v1.27.0
func (op *StopDistributionOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*StopDistributionOperation) Metadata ¶ added in v1.27.0
func (op *StopDistributionOperation) Metadata() (*livestreampb.OperationMetadata, error)
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 (*StopDistributionOperation) Name ¶ added in v1.27.0
func (op *StopDistributionOperation) 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 (*StopDistributionOperation) Poll ¶ added in v1.27.0
func (op *StopDistributionOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*livestreampb.ChannelOperationResponse, 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 (*StopDistributionOperation) Wait ¶ added in v1.27.0
func (op *StopDistributionOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*livestreampb.ChannelOperationResponse, 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.
type 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 ¶
func (op *UpdateChannelOperation) Metadata() (*livestreampb.OperationMetadata, error)
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 ¶
func (op *UpdateChannelOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*livestreampb.Channel, 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 (*UpdateChannelOperation) Wait ¶
func (op *UpdateChannelOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*livestreampb.Channel, 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.
type UpdateDvrSessionOperation ¶ added in v1.24.0
type UpdateDvrSessionOperation struct {
// contains filtered or unexported fields
}
UpdateDvrSessionOperation manages a long-running operation from UpdateDvrSession.
func (*UpdateDvrSessionOperation) Done ¶ added in v1.24.0
func (op *UpdateDvrSessionOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateDvrSessionOperation) Metadata ¶ added in v1.24.0
func (op *UpdateDvrSessionOperation) Metadata() (*livestreampb.OperationMetadata, error)
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 (*UpdateDvrSessionOperation) Name ¶ added in v1.24.0
func (op *UpdateDvrSessionOperation) 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 (*UpdateDvrSessionOperation) Poll ¶ added in v1.24.0
func (op *UpdateDvrSessionOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*livestreampb.DvrSession, 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 (*UpdateDvrSessionOperation) Wait ¶ added in v1.24.0
func (op *UpdateDvrSessionOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*livestreampb.DvrSession, 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.
type 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 ¶
func (op *UpdateInputOperation) Metadata() (*livestreampb.OperationMetadata, error)
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 ¶
func (op *UpdateInputOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*livestreampb.Input, 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 (*UpdateInputOperation) Wait ¶
func (op *UpdateInputOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*livestreampb.Input, 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.
type UpdatePoolOperation ¶ added in v1.19.0
type UpdatePoolOperation struct {
// contains filtered or unexported fields
}
UpdatePoolOperation manages a long-running operation from UpdatePool.
func (*UpdatePoolOperation) Done ¶ added in v1.19.0
func (op *UpdatePoolOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdatePoolOperation) Metadata ¶ added in v1.19.0
func (op *UpdatePoolOperation) Metadata() (*livestreampb.OperationMetadata, error)
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 (*UpdatePoolOperation) Name ¶ added in v1.19.0
func (op *UpdatePoolOperation) 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 (*UpdatePoolOperation) Poll ¶ added in v1.19.0
func (op *UpdatePoolOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*livestreampb.Pool, 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 (*UpdatePoolOperation) Wait ¶ added in v1.19.0
func (op *UpdatePoolOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*livestreampb.Pool, 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.