Documentation ¶
Index ¶
- type PollRates
- type ServerHandler
- func (_this *ServerHandler) GetRate(ctx context.Context, request *exchange_rate.CurrencyRateRequest) (*exchange_rate.CurrencyRateResponse, error)
- func (_this *ServerHandler) GetSubscriptions(ctx context.Context) (...)
- func (_this *ServerHandler) ListCurrencies(ctx context.Context, request *exchange_rate.ListCurrencyRequest) (*exchange_rate.ListCurrencyResponse, error)
- func (_this *ServerHandler) ListRates(ctx context.Context, request *exchange_rate.ListRatesRequest) (*exchange_rate.ListRatesResponse, error)
- func (_this *ServerHandler) StartPolling()
- func (_this *ServerHandler) Subscription(stream exchange_rate.ExchangeRates_SubscriptionServer) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PollRates ¶
type PollRates struct {
// contains filtered or unexported fields
}
func (*PollRates) AddRates ¶
func (h *PollRates) AddRates(rates *exchange_rate.ListRatesResponse)
type ServerHandler ¶
type ServerHandler struct { exchange_rate.UnimplementedExchangeRatesServer *PollRates // contains filtered or unexported fields }
func NewExchangeRateServerHandler ¶
func NewExchangeRateServerHandler(logger *zap.Logger, cache *cache.Cache, service *services.CurrencyService, pollingInterval time.Duration) *ServerHandler
func (*ServerHandler) GetRate ¶
func (_this *ServerHandler) GetRate(ctx context.Context, request *exchange_rate.CurrencyRateRequest) (*exchange_rate.CurrencyRateResponse, error)
func (*ServerHandler) GetSubscriptions ¶
func (_this *ServerHandler) GetSubscriptions(ctx context.Context) (*map[exchange_rate.ExchangeRates_SubscriptionServer][]exchange_rate.ListRatesRequest, error)
GetSubscriptions returns clients subscriptions request
func (*ServerHandler) ListCurrencies ¶
func (_this *ServerHandler) ListCurrencies(ctx context.Context, request *exchange_rate.ListCurrencyRequest) (*exchange_rate.ListCurrencyResponse, error)
func (*ServerHandler) ListRates ¶
func (_this *ServerHandler) ListRates(ctx context.Context, request *exchange_rate.ListRatesRequest) (*exchange_rate.ListRatesResponse, error)
func (*ServerHandler) StartPolling ¶
func (_this *ServerHandler) StartPolling()
func (*ServerHandler) Subscription ¶
func (_this *ServerHandler) Subscription(stream exchange_rate.ExchangeRates_SubscriptionServer) error
Subscription implements the gRPC bidirectional streaming method for the server
Click to show internal directories.
Click to hide internal directories.