swap

package
Version: v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	// PrepareSwap should update source:destination addresses pair before swap
	PrepareSwap(src mint.PublicKey, dst common.Address) (*apimodel.PrepareSwapResult, error)
}

API is a required interface for the GRPC server

type Metrics

type Metrics struct {
	RequestDuration *prometheus.HistogramVec
}

Metrics contains metrics counters

type Service

type Service struct {
	API     API
	Metrics *Metrics
}

Service is Swap implemetation

func (*Service) PrepareSwap

func (s *Service) PrepareSwap(ctx context.Context, m *pb.PrepareSwapRequest) (*pb.PrepareSwapResult, error)

PrepareSwap implementation

Source Files

Jump to

Keyboard shortcuts

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