server

package
v0.0.0-...-0902e11 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Currency

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

Currency is a gRPC server it implements the methods defined by the CurrencyServer interface

func NewCurrencyServer

func NewCurrencyServer(rates *data.ExchangeRate, log hclog.Logger) *Currency

NewCurrency creates a new Currency server

func (*Currency) GetRate

func (c *Currency) GetRate(ctx context.Context, req *protos.RateRequest) (*protos.RateResponse, error)

GetRate implements the CurrencyServer GetRate method and returns the currency exchange rate for the two given currencies.

func (*Currency) SubscribeRate

func (c *Currency) SubscribeRate(src protos.Currency_SubscribeRateServer) error

Jump to

Keyboard shortcuts

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