servergrpc

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCreateChartRequestCancelled = errors.New("create chart request is cancelled")

ErrCreateChartRequestCancelled contains error message about cancelled create chart request.

Functions

This section is empty.

Types

type Server

type Server struct {
	render.UnimplementedChartAPIServer
	// contains filtered or unexported fields
}

Server implements render.ChartAPIServer.

func NewServer

func NewServer(ctx context.Context, log *zerolog.Logger, apiCfg config.APIConfig, rendererCfg config.RendererConfig) (*Server, error)

NewServer configures needed connections and returns a new Server.

func (*Server) Address

func (s *Server) Address() string

Address returns listener address.

func (*Server) CreateChart

func (s *Server) CreateChart(ctx context.Context, req *render.CreateChartRequest) (*render.ChartReply, error)

CreateChart implements render.ChartAPIServer.CreateChart.

func (*Server) GetChart

GetChart implements render.ChartAPIServer.GetChart. It returns codes.NotFound until storage is implemented.

func (*Server) Serve

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

Serve start gRPC server to serve requests.

Jump to

Keyboard shortcuts

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