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 NewCurrency ¶
func NewCurrency(r *data.ExchangeRates, l hclog.Logger) *Currency
NewCurrency creates a new Currency server
func (*Currency) GetRate ¶
func (c *Currency) GetRate(ctx context.Context, rr *protos.RateRequest) (*protos.RateResponse, error)
GetRate implements the CurrencyServer GetRate method and returns the currency exchange rate for the two given currencies.
func (*Currency) SubscribeRates ¶
func (c *Currency) SubscribeRates(src protos.Currency_SubscribeRatesServer) error
SubscribeRates implments the gRPC bidirection streaming method for the server
Click to show internal directories.
Click to hide internal directories.