pb

package
v0.0.0-...-1bcb25e Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ADDR string = "localhost"
	PORT int    = 4000
)

Variables

View Source
var File_stream_proto protoreflect.FileDescriptor

Functions

func RegisterStreamerService

func RegisterStreamerService(s grpc.ServiceRegistrar, srv *StreamerService)

RegisterStreamerService registers a service implementation with a gRPC server.

Types

type Data

type Data struct {
	Sequence int32  `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"`
	Filename string `protobuf:"bytes,2,opt,name=filename,proto3" json:"filename,omitempty"`
	Rate     int64  `protobuf:"varint,3,opt,name=rate,proto3" json:"rate,omitempty"`
	Channels int64  `protobuf:"varint,4,opt,name=channels,proto3" json:"channels,omitempty"`
	Data     []byte `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*Data) Descriptor deprecated

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

Deprecated: Use Data.ProtoReflect.Descriptor instead.

func (*Data) GetChannels

func (x *Data) GetChannels() int64

func (*Data) GetData

func (x *Data) GetData() []byte

func (*Data) GetFilename

func (x *Data) GetFilename() string

func (*Data) GetRate

func (x *Data) GetRate() int64

func (*Data) GetSequence

func (x *Data) GetSequence() int32

func (*Data) ProtoMessage

func (*Data) ProtoMessage()

func (*Data) ProtoReflect

func (x *Data) ProtoReflect() protoreflect.Message

func (*Data) Reset

func (x *Data) Reset()

func (*Data) String

func (x *Data) String() string

type StreamServer

type StreamServer struct{}

func (*StreamServer) Audio

func (s *StreamServer) Audio(empty *emptypb.Empty, a Streamer_AudioServer) error

type StreamerClient

type StreamerClient interface {
	Audio(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (Streamer_AudioClient, error)
}

StreamerClient is the client API for Streamer service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewStreamerClient

func NewStreamerClient(cc grpc.ClientConnInterface) StreamerClient

type StreamerService

type StreamerService struct {
	Audio func(*emptypb.Empty, Streamer_AudioServer) error
}

StreamerService is the service API for Streamer service. Fields should be assigned to their respective handler implementations only before RegisterStreamerService is called. Any unassigned fields will result in the handler for that method returning an Unimplemented error.

func NewServer

func NewServer() *StreamerService

func NewStreamerService

func NewStreamerService(s interface{}) *StreamerService

NewStreamerService creates a new StreamerService containing the implemented methods of the Streamer service in s. Any unimplemented methods will result in the gRPC server returning an UNIMPLEMENTED status to the client. This includes situations where the method handler is misspelled or has the wrong signature. For this reason, this function should be used with great care and is not recommended to be used by most users.

type Streamer_AudioClient

type Streamer_AudioClient interface {
	Recv() (*Data, error)
	grpc.ClientStream
}

type Streamer_AudioServer

type Streamer_AudioServer interface {
	Send(*Data) error
	grpc.ServerStream
}

type UnstableStreamerService

type UnstableStreamerService interface {
	Audio(*emptypb.Empty, Streamer_AudioServer) error
}

UnstableStreamerService is the service API for Streamer service. New methods may be added to this interface if they are added to the service definition, which is not a backward-compatible change. For this reason, use of this type is not recommended.

Jump to

Keyboard shortcuts

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