service

package
v0.101.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildErrorResponse

func BuildErrorResponse(err error) (*api.CallResponse, error)

func BuildSuccessfullResponse

func BuildSuccessfullResponse(payload interface{}) (*api.CallResponse, error)

func UnmarshalRequestArgumentsInto

func UnmarshalRequestArgumentsInto(req *api.CallRequest, into interface{}) error

Types

type Service

type Service struct {
	api.UnimplementedServiceServer
	Logger logger.Logger
	Port   string
	// contains filtered or unexported fields
}

Service implements the gRPC service to be used by the different catalog services

func New

func New(port string) Service

func (*Service) Call

func (s *Service) Call(ctx context.Context, req *api.CallRequest) (*api.CallResponse, error)

func (*Service) Init

func (s *Service) Init(ctx context.Context, req *api.InitRequest) (*api.InitResponse, error)

func (*Service) RegisterEndpoint

func (s *Service) RegisterEndpoint(name string, handler endpointHandler) error

func (*Service) Run

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

Jump to

Keyboard shortcuts

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