grpc

package
v0.0.0-...-bc1f52c Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithConfig

func WithConfig(cfg config.GRPC) func(*EndPoint)

func WithEvents

func WithEvents(evt *event.Event) func(*EndPoint)

func WithLogs

func WithLogs(logs *zap.Logger) func(*EndPoint)

func WithMetrics

func WithMetrics(m *metrics.Metrics) func(*EndPoint)

func WithPersistence

func WithPersistence(p persistenceadapter.Adapter) func(*EndPoint)

func WithTransactions

func WithTransactions(t transaction.Adapter) func(*EndPoint)

func WithUserAddress

func WithUserAddress(a string) func(*EndPoint)

func WithWallets

func WithWallets(w wallet.IWallets) func(*EndPoint)

Types

type EndPoint

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

func New

func New(stop chan error, options ...func(*EndPoint)) *EndPoint

func (*EndPoint) CreateBlock

func (e *EndPoint) CreateBlock(_ context.Context, req *api.CreateBlockInput) (*api.CreateBlockOutput, error)

func (*EndPoint) CreateWallet

func (e *EndPoint) CreateWallet(_ context.Context, input *api.CreateWalletInput) (*api.CreateWalletOutput, error)

func (*EndPoint) Enabled

func (e *EndPoint) Enabled() bool

func (*EndPoint) GetBalance

func (e *EndPoint) GetBalance(_ context.Context, req *api.GetBalanceInput) (*api.GetBalanceOutput, error)

func (EndPoint) GetBlockChain

func (EndPoint) GetBlockChain(_ context.Context, req *api.Ping) (*api.Pong, error)

func (EndPoint) GetPong

func (EndPoint) GetPong(_ context.Context, _ *protoAPI.Ping) (*protoAPI.Pong, error)

GetPong service

func (*EndPoint) GetServersAddress

func (e *EndPoint) GetServersAddress(_ context.Context, req *api.Ping) (*api.Pong, error)

func (*EndPoint) GetTraces

func (e *EndPoint) GetTraces(_ *api.TraceInput, stream api.Api_GetTracesServer) error

func (*EndPoint) GetWallet

func (e *EndPoint) GetWallet(_ context.Context, req *api.GetWalletInput) (*api.GetWalletOutput, error)

GetWallet

func (*EndPoint) GetWallets

func (e *EndPoint) GetWallets(_ context.Context, req *api.Ping) (*api.Pong, error)

func (*EndPoint) Listen

func (e *EndPoint) Listen() error

Listen start the server.

func (*EndPoint) SendBlock

func (e *EndPoint) SendBlock(_ context.Context, req *api.SendBlockInput) (*api.SendBlockOutput, error)

func (*EndPoint) Shutdown

func (e *EndPoint) Shutdown()

func (*EndPoint) ValidWallet

func (e *EndPoint) ValidWallet(_ context.Context, req *api.ValidWalletInput) (*api.ValidWalletOutput, error)

Jump to

Keyboard shortcuts

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