unigrpc

package
v4.1.5 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterService

func RegisterService(server *grpc.Server, service unistream.CentrifugoUniStreamServer) error

RegisterService ...

Types

type Config

type Config struct {
	// ProtocolVersion used by default. If not set then we use centrifuge.ProtocolVersion1.
	ProtocolVersion centrifuge.ProtocolVersion
}

type RawCodec

type RawCodec struct{}

RawCodec allows sending Protobuf encoded Pushes without additional wrapping and marshaling.

func (*RawCodec) Marshal

func (c *RawCodec) Marshal(v interface{}) ([]byte, error)

func (*RawCodec) String

func (c *RawCodec) String() string

func (*RawCodec) Unmarshal

func (c *RawCodec) Unmarshal(data []byte, v interface{}) error

type Service

type Service struct {
	unistream.UnimplementedCentrifugoUniStreamServer
	// contains filtered or unexported fields
}

Service can work with client GRPC connections.

func NewService

func NewService(n *centrifuge.Node, c Config) *Service

NewService creates new Service.

func (*Service) Consume

Consume is a unidirectional server->client stream with real-time data.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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