Documentation ¶
Index ¶
- Constants
- type Server
- func (s *Server) Accept(ctx context.Context, request *consensus.AcceptRequest) (*consensus.AcceptResult, error)
- func (s *Server) GetAddressStatement(ctx context.Context, request *ledger.GetAddressStatementRequest) (*ledger.GetAddressStatementResult, error)
- func (s *Server) GetLastTransaction(ctx context.Context, request *ledger.GetLastTransactionRequest) (*ledger.GetLastTransactionResult, error)
- func (s *Server) GetTransaction(ctx context.Context, request *ledger.GetTransactionRequest) (*ledger.GetTransactionResult, error)
- func (s *Server) Register(ctx context.Context, request *ledger.RegisterRequest) (*ledger.RegisterResult, error)
- func (s *Server) Run() error
- func (s *Server) Verify(ctx context.Context, request *ledger.VerifyRequest) (*ledger.VerifyResult, error)
- func (s *Server) VerifyTransaction(ctx context.Context, request *ledger.VerifyTransactionRequest) (*ledger.VerifyTransactionResult, error)
- func (s *Server) Vote(ctx context.Context, request *consensus.VoteRequest) (*consensus.VoteResult, error)
Constants ¶
View Source
const ( ErrDeclinedByVoting = errors.Error("transaction declined by voting") ErrNoPeersForVoting = errors.Error("no peers for voting") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func New ¶
func New(ld ledger.Ledger, con consensus.Consensus, dis peerdiscovery.Discoverer, lis net.Listener) *Server
func (*Server) Accept ¶
func (s *Server) Accept(ctx context.Context, request *consensus.AcceptRequest) (*consensus.AcceptResult, error)
func (*Server) GetAddressStatement ¶
func (s *Server) GetAddressStatement(ctx context.Context, request *ledger.GetAddressStatementRequest) (*ledger.GetAddressStatementResult, error)
func (*Server) GetLastTransaction ¶
func (s *Server) GetLastTransaction(ctx context.Context, request *ledger.GetLastTransactionRequest) (*ledger.GetLastTransactionResult, error)
func (*Server) GetTransaction ¶
func (s *Server) GetTransaction(ctx context.Context, request *ledger.GetTransactionRequest) (*ledger.GetTransactionResult, error)
func (*Server) Register ¶
func (s *Server) Register(ctx context.Context, request *ledger.RegisterRequest) (*ledger.RegisterResult, error)
func (*Server) Verify ¶
func (s *Server) Verify(ctx context.Context, request *ledger.VerifyRequest) (*ledger.VerifyResult, error)
func (*Server) VerifyTransaction ¶
func (s *Server) VerifyTransaction(ctx context.Context, request *ledger.VerifyTransactionRequest) (*ledger.VerifyTransactionResult, error)
func (*Server) Vote ¶
func (s *Server) Vote(ctx context.Context, request *consensus.VoteRequest) (*consensus.VoteResult, error)
Click to show internal directories.
Click to hide internal directories.