Documentation ¶
Index ¶
- Variables
- func Register(params RegisterParams) error
- type RegisterParams
- type Server
- func (s *Server) GetBlockByTransaction(ctx context.Context, req *api.GetBlockByTransactionRequest) (*api.GetBlockByTransactionResponse, error)
- func (s *Server) GetBlockFile(ctx context.Context, req *api.GetBlockFileRequest) (*api.GetBlockFileResponse, error)
- func (s *Server) GetBlockFilesByRange(ctx context.Context, req *api.GetBlockFilesByRangeRequest) (*api.GetBlockFilesByRangeResponse, error)
- func (s *Server) GetChainEvents(ctx context.Context, req *api.GetChainEventsRequest) (*api.GetChainEventsResponse, error)
- func (s *Server) GetChainMetadata(ctx context.Context, req *api.GetChainMetadataRequest) (*api.GetChainMetadataResponse, error)
- func (s *Server) GetLatestBlock(ctx context.Context, req *api.GetLatestBlockRequest) (*api.GetLatestBlockResponse, error)
- func (s *Server) GetNativeBlock(ctx context.Context, req *api.GetNativeBlockRequest) (*api.GetNativeBlockResponse, error)
- func (s *Server) GetNativeBlocksByRange(ctx context.Context, req *api.GetNativeBlocksByRangeRequest) (*api.GetNativeBlocksByRangeResponse, error)
- func (s *Server) GetNativeTransaction(ctx context.Context, req *api.GetNativeTransactionRequest) (*api.GetNativeTransactionResponse, error)
- func (s *Server) GetRawBlock(ctx context.Context, req *api.GetRawBlockRequest) (*api.GetRawBlockResponse, error)
- func (s *Server) GetRawBlocksByRange(ctx context.Context, req *api.GetRawBlocksByRangeRequest) (*api.GetRawBlocksByRangeResponse, error)
- func (s *Server) GetRosettaBlock(ctx context.Context, req *api.GetRosettaBlockRequest) (*api.GetRosettaBlockResponse, error)
- func (s *Server) GetRosettaBlocksByRange(ctx context.Context, req *api.GetRosettaBlocksByRangeRequest) (*api.GetRosettaBlocksByRangeResponse, error)
- func (s *Server) GetVerifiedAccountState(ctx context.Context, req *api.GetVerifiedAccountStateRequest) (*api.GetVerifiedAccountStateResponse, error)
- func (s *Server) GetVersionedChainEvent(ctx context.Context, req *api.GetVersionedChainEventRequest) (*api.GetVersionedChainEventResponse, error)
- func (s *Server) StreamChainEvents(request *api.ChainEventsRequest, ...) error
- type ServerParams
- type Throttler
Constants ¶
This section is empty.
Variables ¶
View Source
var ( InitialPositionLatest = api.InitialPosition_LATEST.String() InitialPositionEarliest = api.InitialPosition_EARLIEST.String() )
Functions ¶
func Register ¶
func Register(params RegisterParams) error
Types ¶
type RegisterParams ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(params ServerParams) *Server
func (*Server) GetBlockByTransaction ¶
func (s *Server) GetBlockByTransaction(ctx context.Context, req *api.GetBlockByTransactionRequest) (*api.GetBlockByTransactionResponse, error)
func (*Server) GetBlockFile ¶
func (s *Server) GetBlockFile(ctx context.Context, req *api.GetBlockFileRequest) (*api.GetBlockFileResponse, error)
func (*Server) GetBlockFilesByRange ¶
func (s *Server) GetBlockFilesByRange(ctx context.Context, req *api.GetBlockFilesByRangeRequest) (*api.GetBlockFilesByRangeResponse, error)
func (*Server) GetChainEvents ¶
func (s *Server) GetChainEvents(ctx context.Context, req *api.GetChainEventsRequest) (*api.GetChainEventsResponse, error)
func (*Server) GetChainMetadata ¶
func (s *Server) GetChainMetadata(ctx context.Context, req *api.GetChainMetadataRequest) (*api.GetChainMetadataResponse, error)
func (*Server) GetLatestBlock ¶
func (s *Server) GetLatestBlock(ctx context.Context, req *api.GetLatestBlockRequest) (*api.GetLatestBlockResponse, error)
func (*Server) GetNativeBlock ¶
func (s *Server) GetNativeBlock(ctx context.Context, req *api.GetNativeBlockRequest) (*api.GetNativeBlockResponse, error)
func (*Server) GetNativeBlocksByRange ¶
func (s *Server) GetNativeBlocksByRange(ctx context.Context, req *api.GetNativeBlocksByRangeRequest) (*api.GetNativeBlocksByRangeResponse, error)
func (*Server) GetNativeTransaction ¶
func (s *Server) GetNativeTransaction(ctx context.Context, req *api.GetNativeTransactionRequest) (*api.GetNativeTransactionResponse, error)
func (*Server) GetRawBlock ¶
func (s *Server) GetRawBlock(ctx context.Context, req *api.GetRawBlockRequest) (*api.GetRawBlockResponse, error)
func (*Server) GetRawBlocksByRange ¶
func (s *Server) GetRawBlocksByRange(ctx context.Context, req *api.GetRawBlocksByRangeRequest) (*api.GetRawBlocksByRangeResponse, error)
func (*Server) GetRosettaBlock ¶
func (s *Server) GetRosettaBlock(ctx context.Context, req *api.GetRosettaBlockRequest) (*api.GetRosettaBlockResponse, error)
func (*Server) GetRosettaBlocksByRange ¶
func (s *Server) GetRosettaBlocksByRange(ctx context.Context, req *api.GetRosettaBlocksByRangeRequest) (*api.GetRosettaBlocksByRangeResponse, error)
func (*Server) GetVerifiedAccountState ¶
func (s *Server) GetVerifiedAccountState(ctx context.Context, req *api.GetVerifiedAccountStateRequest) (*api.GetVerifiedAccountStateResponse, error)
func (*Server) GetVersionedChainEvent ¶
func (s *Server) GetVersionedChainEvent(ctx context.Context, req *api.GetVersionedChainEventRequest) (*api.GetVersionedChainEventResponse, error)
func (*Server) StreamChainEvents ¶
func (s *Server) StreamChainEvents(request *api.ChainEventsRequest, stream api.ChainStorage_StreamChainEventsServer) error
type ServerParams ¶
type ServerParams struct { fx.In fxparams.Params MetaStorage metastorage.MetaStorage BlobStorage blobstorage.BlobStorage TransactionStorage metastorage.TransactionStorage S3Client s3.Client BlockchainClient client.Client `name:"slave"` Parser parser.Parser Lifecycle fx.Lifecycle }
type Throttler ¶
type Throttler struct {
// contains filtered or unexported fields
}
Throttler allows a request only if all the following conditions are met:
- Global rate limit, shared by all client IDs, is not reached. This is configured via "api.rate_limit.global_rps".
- Per-client rate limit is not reached. This is configured via either "api.auth.clients" or "api.rate_limit.per_client_rps". The former supports client-specific rate limits, while the latter uses the same rate limit for all client IDs. See throttler_test.go for sample configs.
func NewThrottler ¶
Click to show internal directories.
Click to hide internal directories.