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
Click to show internal directories.
Click to hide internal directories.