rpc

package
v1.0.0-alpha.23 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2020 License: GPL-3.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host             string
	Port             string
	CertFlag         string
	KeyFlag          string
	ValDB            db.Database
	ValidatorService *client.ValidatorService
}

Config options for the gRPC server.

type Server

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

Server defining a gRPC server for the remote signer API.

func NewServer

func NewServer(ctx context.Context, cfg *Config) *Server

NewServer instantiates a new gRPC server.

func (*Server) JWTInterceptor

func (s *Server) JWTInterceptor() grpc.UnaryServerInterceptor

JWTInterceptor is a gRPC unary interceptor to authorize incoming requests for methods that are NOT in the noAuthPaths configuration map.

func (*Server) ListBalances

func (s *Server) ListBalances(ctx context.Context, req *pb.AccountRequest) (*pb.ListBalancesResponse, error)

ListBalances lists the validator balances.

func (*Server) ListPerformance

func (s *Server) ListPerformance(ctx context.Context, req *pb.AccountRequest) (*pb.ListPerformanceResponse, error)

ListPerformance lists the validator current performances.

func (*Server) ListStatuses

func (s *Server) ListStatuses(ctx context.Context, req *pb.AccountRequest) (*pb.ListStatusesResponse, error)

ListStatuses lists the validator current statuses.

func (*Server) Login

func (s *Server) Login(ctx context.Context, req *pb.AuthRequest) (*pb.AuthResponse, error)

Login to authenticate with the validator RPC API using a password.

func (*Server) Signup

func (s *Server) Signup(ctx context.Context, req *pb.AuthRequest) (*pb.AuthResponse, error)

Signup to authenticate access to the validator RPC API using bcrypt and a sufficiently strong password check.

func (*Server) Start

func (s *Server) Start()

Start the gRPC server.

func (*Server) Status

func (s *Server) Status() error

Status returns nil or credentialError.

func (*Server) Stop

func (s *Server) Stop() error

Stop the gRPC server.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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