service

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server wraps a gRPC server and provides methods for managing server state.

func (*Server) RegisterSink

func (s *Server) RegisterSink(srv *Sink)

RegisterSink registers the server API for the Sink service with the gRPC server.

func (*Server) Setup

func (s *Server) Setup(opt ...grpc.ServerOption)

Setup creates a new gRPC server.

func (*Server) Start

func (s *Server) Start(addr string) error

Start starts the gRPC server. This method blocks the caller until the server is stopped.

func (*Server) Stop

func (s *Server) Stop()

Stop stops the gRPC server.

type Sink

type Sink struct {
	pb.UnimplementedSinkServiceServer
	// Capsules can be optionally used to store all capsules sent by the client.
	Capsules []config.Capsule
	// contains filtered or unexported fields
}

Sink implements the server API for the Sink service.

func (*Sink) Block

func (s *Sink) Block()

Block blocks the caller until the gRPC stream is closed. This signals that all data was received by the server.

func (*Sink) Send

func (s *Sink) Send(stream pb.SinkService_SendServer) error

Send implements the Send RPC.

Jump to

Keyboard shortcuts

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