server

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GRPCServer

type GRPCServer struct {
	pb.UnimplementedFlakeServiceServer
	// contains filtered or unexported fields
}

func NewGRPCServer added in v1.0.2

func NewGRPCServer(cfg *config.Config, log *logrus.Logger) *GRPCServer

NewGRPCServer creates a new grpc server

func (*GRPCServer) Decompose

func (s *GRPCServer) Decompose(ctx context.Context, req *pb.DecomposeRequest) (*pb.DecomposeResponse, error)

Decompose implements the FlakeServiceServer interface

func (*GRPCServer) GetUUID

func (s *GRPCServer) GetUUID(ctx context.Context, req *pb.GetUUIDRequest) (*pb.GetUUIDResponse, error)

GetUUID implements the FlakeServiceServer interface

func (*GRPCServer) Serve

func (s *GRPCServer) Serve() error

Serve starts the grpc server, implements the Server interface

type RESTServer

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

func NewRESTServer added in v1.0.2

func NewRESTServer(cfg *config.Config, log *logrus.Logger) *RESTServer

NewRESTServer creates a new rest server

func (*RESTServer) Serve

func (s *RESTServer) Serve() error

Serve starts the rest server, implements the Server interface

type Server

type Server interface {
	Serve() error
}

func NewServer

func NewServer(cfg *config.Config, log *logrus.Logger) Server

NewServer creates a new server

Jump to

Keyboard shortcuts

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