net

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterOrchestratorServer added in v0.3.3

func RegisterOrchestratorServer(s *grpc.Server, srv OrchestratorServer)

Types

type AuthToken added in v0.3.3

type AuthToken struct {
	// Signature of the orchestrator over the remaining fields
	Sig                  []byte   `protobuf:"bytes,1,opt,name=sig,proto3" json:"sig,omitempty"`
	JobId                int64    `protobuf:"varint,16,opt,name=jobId" json:"jobId,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

AuthToken is sent by the orchestrator and encoded in the `credentials` field This record is opaque to the broadcaster and is only relevant between the orchestrator and the transcoder.

func (*AuthToken) Descriptor added in v0.3.3

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

func (*AuthToken) GetJobId added in v0.3.3

func (m *AuthToken) GetJobId() int64

func (*AuthToken) GetSig added in v0.3.3

func (m *AuthToken) GetSig() []byte

func (*AuthToken) ProtoMessage added in v0.3.3

func (*AuthToken) ProtoMessage()

func (*AuthToken) Reset added in v0.3.3

func (m *AuthToken) Reset()

func (*AuthToken) String added in v0.3.3

func (m *AuthToken) String() string

func (*AuthToken) XXX_DiscardUnknown added in v0.3.3

func (m *AuthToken) XXX_DiscardUnknown()

func (*AuthToken) XXX_Marshal added in v0.3.3

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

func (*AuthToken) XXX_Merge added in v0.3.3

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

func (*AuthToken) XXX_Size added in v0.3.3

func (m *AuthToken) XXX_Size() int

func (*AuthToken) XXX_Unmarshal added in v0.3.3

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

type NodeStatus

type NodeStatus struct {
	Manifests map[string]*m3u8.MasterPlaylist
}

func (*NodeStatus) FromString

func (n *NodeStatus) FromString(str string) error

func (NodeStatus) String

func (n NodeStatus) String() string

type OrchestratorClient added in v0.3.3

type OrchestratorClient interface {
	// Called by the broadcaster to request transcoder info from an orchestrator.
	GetTranscoder(ctx context.Context, in *TranscoderRequest, opts ...grpc.CallOption) (*TranscoderInfo, error)
}

OrchestratorClient is the client API for Orchestrator service.

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

func NewOrchestratorClient added in v0.3.3

func NewOrchestratorClient(cc *grpc.ClientConn) OrchestratorClient

type OrchestratorServer added in v0.3.3

type OrchestratorServer interface {
	// Called by the broadcaster to request transcoder info from an orchestrator.
	GetTranscoder(context.Context, *TranscoderRequest) (*TranscoderInfo, error)
}

OrchestratorServer is the server API for Orchestrator service.

type SegData added in v0.3.3

type SegData struct {
	// Sequence number of the segment to be transcoded
	Seq int64 `protobuf:"varint,1,opt,name=seq" json:"seq,omitempty"`
	// Hash of the segment data to be transcoded
	Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
	// Broadcaster signature for the segment. Corresponds to:
	// broadcaster.sign(streamId | seqNo | dataHash)
	// where streamId is derived from the jobId
	Sig                  []byte   `protobuf:"bytes,3,opt,name=sig,proto3" json:"sig,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Data included by the broadcaster when submitting a segment for transcoding.

func (*SegData) Descriptor added in v0.3.3

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

func (*SegData) GetHash added in v0.3.3

func (m *SegData) GetHash() []byte

func (*SegData) GetSeq added in v0.3.3

func (m *SegData) GetSeq() int64

func (*SegData) GetSig added in v0.3.3

func (m *SegData) GetSig() []byte

func (*SegData) ProtoMessage added in v0.3.3

func (*SegData) ProtoMessage()

func (*SegData) Reset added in v0.3.3

func (m *SegData) Reset()

func (*SegData) String added in v0.3.3

func (m *SegData) String() string

func (*SegData) XXX_DiscardUnknown added in v0.3.3

func (m *SegData) XXX_DiscardUnknown()

func (*SegData) XXX_Marshal added in v0.3.3

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

func (*SegData) XXX_Merge added in v0.3.3

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

func (*SegData) XXX_Size added in v0.3.3

func (m *SegData) XXX_Size() int

func (*SegData) XXX_Unmarshal added in v0.3.3

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

type TranscodeData added in v0.3.3

type TranscodeData struct {
	// Transcoded data, in the order specified in the job options
	Segments []*TranscodedSegmentData `protobuf:"bytes,1,rep,name=segments" json:"segments,omitempty"`
	// Signature of the hash of the concatenated hashes
	Sig                  []byte   `protobuf:"bytes,2,opt,name=sig,proto3" json:"sig,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

A set of transcoded segments following the profiles specified in the jo .

func (*TranscodeData) Descriptor added in v0.3.3

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

func (*TranscodeData) GetSegments added in v0.3.3

func (m *TranscodeData) GetSegments() []*TranscodedSegmentData

func (*TranscodeData) GetSig added in v0.3.3

func (m *TranscodeData) GetSig() []byte

func (*TranscodeData) ProtoMessage added in v0.3.3

func (*TranscodeData) ProtoMessage()

func (*TranscodeData) Reset added in v0.3.3

func (m *TranscodeData) Reset()

func (*TranscodeData) String added in v0.3.3

func (m *TranscodeData) String() string

func (*TranscodeData) XXX_DiscardUnknown added in v0.3.3

func (m *TranscodeData) XXX_DiscardUnknown()

func (*TranscodeData) XXX_Marshal added in v0.3.3

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

func (*TranscodeData) XXX_Merge added in v0.3.3

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

func (*TranscodeData) XXX_Size added in v0.3.3

func (m *TranscodeData) XXX_Size() int

func (*TranscodeData) XXX_Unmarshal added in v0.3.3

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

type TranscodeResult added in v0.3.3

type TranscodeResult struct {
	// Sequence number of the transcoded results.
	Seq int64 `protobuf:"varint,1,opt,name=seq" json:"seq,omitempty"`
	// Result of transcoding can be an error, or successful with more info
	//
	// Types that are valid to be assigned to Result:
	//	*TranscodeResult_Error
	//	*TranscodeResult_Data
	Result               isTranscodeResult_Result `protobuf_oneof:"result"`
	XXX_NoUnkeyedLiteral struct{}                 `json:"-"`
	XXX_unrecognized     []byte                   `json:"-"`
	XXX_sizecache        int32                    `json:"-"`
}

Response that a transcoder sends after transcoding a segment.

func (*TranscodeResult) Descriptor added in v0.3.3

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

func (*TranscodeResult) GetData added in v0.3.3

func (m *TranscodeResult) GetData() *TranscodeData

func (*TranscodeResult) GetError added in v0.3.3

func (m *TranscodeResult) GetError() string

func (*TranscodeResult) GetResult added in v0.3.3

func (m *TranscodeResult) GetResult() isTranscodeResult_Result

func (*TranscodeResult) GetSeq added in v0.3.3

func (m *TranscodeResult) GetSeq() int64

func (*TranscodeResult) ProtoMessage added in v0.3.3

func (*TranscodeResult) ProtoMessage()

func (*TranscodeResult) Reset added in v0.3.3

func (m *TranscodeResult) Reset()

func (*TranscodeResult) String added in v0.3.3

func (m *TranscodeResult) String() string

func (*TranscodeResult) XXX_DiscardUnknown added in v0.3.3

func (m *TranscodeResult) XXX_DiscardUnknown()

func (*TranscodeResult) XXX_Marshal added in v0.3.3

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

func (*TranscodeResult) XXX_Merge added in v0.3.3

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

func (*TranscodeResult) XXX_OneofFuncs added in v0.3.3

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

XXX_OneofFuncs is for the internal use of the proto package.

func (*TranscodeResult) XXX_Size added in v0.3.3

func (m *TranscodeResult) XXX_Size() int

func (*TranscodeResult) XXX_Unmarshal added in v0.3.3

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

type TranscodeResult_Data added in v0.3.3

type TranscodeResult_Data struct {
	Data *TranscodeData `protobuf:"bytes,3,opt,name=data,oneof"`
}

type TranscodeResult_Error added in v0.3.3

type TranscodeResult_Error struct {
	Error string `protobuf:"bytes,2,opt,name=error,oneof"`
}

type TranscodedSegmentData added in v0.3.3

type TranscodedSegmentData struct {
	// URL where the transcoded data can be downloaded from
	Url                  string   `protobuf:"bytes,1,opt,name=url" json:"url,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Individual transcoded segment data.

func (*TranscodedSegmentData) Descriptor added in v0.3.3

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

func (*TranscodedSegmentData) GetUrl added in v0.3.3

func (m *TranscodedSegmentData) GetUrl() string

func (*TranscodedSegmentData) ProtoMessage added in v0.3.3

func (*TranscodedSegmentData) ProtoMessage()

func (*TranscodedSegmentData) Reset added in v0.3.3

func (m *TranscodedSegmentData) Reset()

func (*TranscodedSegmentData) String added in v0.3.3

func (m *TranscodedSegmentData) String() string

func (*TranscodedSegmentData) XXX_DiscardUnknown added in v0.3.3

func (m *TranscodedSegmentData) XXX_DiscardUnknown()

func (*TranscodedSegmentData) XXX_Marshal added in v0.3.3

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

func (*TranscodedSegmentData) XXX_Merge added in v0.3.3

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

func (*TranscodedSegmentData) XXX_Size added in v0.3.3

func (m *TranscodedSegmentData) XXX_Size() int

func (*TranscodedSegmentData) XXX_Unmarshal added in v0.3.3

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

type TranscoderInfo added in v0.3.3

type TranscoderInfo struct {
	// URI of the transcoder to use for submitting segments
	Transcoder string `protobuf:"bytes,1,opt,name=transcoder" json:"transcoder,omitempty"`
	// Signals the authentication method to expect within `credentials`. This
	// field is opaque to the broadcaster, and should be passed to the transcoder.
	AuthType string `protobuf:"bytes,2,opt,name=authType" json:"authType,omitempty"`
	// Credentials to verify the request has been authorized by an orchestrator.
	// This field is opaque to the broadcaster.
	Credentials string `protobuf:"bytes,3,opt,name=credentials" json:"credentials,omitempty"`
	// Transcoded streamId list to update the master manifest on the broadcaster.
	StreamIds            map[string]string `` /* 139-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

The orchestrator sends this in response to `GetTranscoder`, containing the transcoder URI, associated credentials authorizing the broadcaster to use the transcoder, and miscellaneous data related to the job.

func (*TranscoderInfo) Descriptor added in v0.3.3

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

func (*TranscoderInfo) GetAuthType added in v0.3.3

func (m *TranscoderInfo) GetAuthType() string

func (*TranscoderInfo) GetCredentials added in v0.3.3

func (m *TranscoderInfo) GetCredentials() string

func (*TranscoderInfo) GetStreamIds added in v0.3.3

func (m *TranscoderInfo) GetStreamIds() map[string]string

func (*TranscoderInfo) GetTranscoder added in v0.3.3

func (m *TranscoderInfo) GetTranscoder() string

func (*TranscoderInfo) ProtoMessage added in v0.3.3

func (*TranscoderInfo) ProtoMessage()

func (*TranscoderInfo) Reset added in v0.3.3

func (m *TranscoderInfo) Reset()

func (*TranscoderInfo) String added in v0.3.3

func (m *TranscoderInfo) String() string

func (*TranscoderInfo) XXX_DiscardUnknown added in v0.3.3

func (m *TranscoderInfo) XXX_DiscardUnknown()

func (*TranscoderInfo) XXX_Marshal added in v0.3.3

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

func (*TranscoderInfo) XXX_Merge added in v0.3.3

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

func (*TranscoderInfo) XXX_Size added in v0.3.3

func (m *TranscoderInfo) XXX_Size() int

func (*TranscoderInfo) XXX_Unmarshal added in v0.3.3

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

type TranscoderRequest added in v0.3.3

type TranscoderRequest struct {
	// ID of the job that the broadcaster needs a transcoder for
	JobId int64 `protobuf:"varint,1,opt,name=jobId" json:"jobId,omitempty"`
	// Broadcaster's signature over the jobId
	Sig                  []byte   `protobuf:"bytes,2,opt,name=sig,proto3" json:"sig,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

This request is sent by the broadcaster in `GetTranscoder` to request information on which transcoder to use.

func (*TranscoderRequest) Descriptor added in v0.3.3

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

func (*TranscoderRequest) GetJobId added in v0.3.3

func (m *TranscoderRequest) GetJobId() int64

func (*TranscoderRequest) GetSig added in v0.3.3

func (m *TranscoderRequest) GetSig() []byte

func (*TranscoderRequest) ProtoMessage added in v0.3.3

func (*TranscoderRequest) ProtoMessage()

func (*TranscoderRequest) Reset added in v0.3.3

func (m *TranscoderRequest) Reset()

func (*TranscoderRequest) String added in v0.3.3

func (m *TranscoderRequest) String() string

func (*TranscoderRequest) XXX_DiscardUnknown added in v0.3.3

func (m *TranscoderRequest) XXX_DiscardUnknown()

func (*TranscoderRequest) XXX_Marshal added in v0.3.3

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

func (*TranscoderRequest) XXX_Merge added in v0.3.3

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

func (*TranscoderRequest) XXX_Size added in v0.3.3

func (m *TranscoderRequest) XXX_Size() int

func (*TranscoderRequest) XXX_Unmarshal added in v0.3.3

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

Jump to

Keyboard shortcuts

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