server

package
v0.0.0-...-f13fb15 Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IStorage

type IStorage interface {
	Get(key string) ([]byte, error)
	Set(key string, value []byte) error
	Delete(key string) error
}

type Server

type Server struct {
	pb.UnimplementedGRPCStoreServiceServer
	// contains filtered or unexported fields
}

func New

func New(logger zerolog.Logger, cfg config.ServerConfig, storage IStorage) *Server

func (*Server) Delete

func (s *Server) Delete(ctx context.Context, req *pb.DeleteRequest) (*pb.DeleteResult, error)

func (*Server) Get

func (s *Server) Get(ctx context.Context, req *pb.GetRequest) (*pb.GetResult, error)

func (*Server) Name

func (s *Server) Name() string

func (*Server) ReadyCh

func (s *Server) ReadyCh() <-chan struct{}

func (*Server) Run

func (s *Server) Run(ctx context.Context) error

func (*Server) Set

func (s *Server) Set(ctx context.Context, req *pb.SetRequest) (*pb.SetResult, error)

Directories

Path Synopsis
Package mock_server is a generated GoMock package.
Package mock_server is a generated GoMock package.

Jump to

Keyboard shortcuts

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