grpc

package
v1.6.11 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CNS

type CNS struct {
	pb.UnimplementedCNSServer
	Logger *zap.Logger
	State  *restserver.HTTPRestService
}

CNSService defines the CNS gRPC service.

func (*CNS) GetNodeInfo

func (s *CNS) GetNodeInfo(_ context.Context, req *pb.NodeInfoRequest) (*pb.NodeInfoResponse, error)

type Server

type Server struct {
	Settings   ServerSettings
	CnsService pb.CNSServer
	Logger     *zap.Logger
}

Server struct to hold the gRPC server settings and the CNS service.

func NewServer

func NewServer(settings ServerSettings, cnsService pb.CNSServer, logger *zap.Logger) (*Server, error)

NewServer initializes a new gRPC server instance.

func (*Server) Start

func (s *Server) Start() error

Start starts the gRPC server.

type ServerSettings

type ServerSettings struct {
	IPAddress string
	Port      uint16
}

GrpcServerSettings holds the gRPC server settings.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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