Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { PruningServiceClient // Close the connection to the server. Any subsequent requests will fail. Close() error }
Client defines the full client interface for interacting with a CometBFT node via the privileged gRPC server.
func New ¶
New constructs a client for interacting with a CometBFT node via its privileged gRPC server.
Makes no assumptions about whether or not to use TLS to connect to the given address. To connect to a gRPC server without using TLS, use the WithInsecure option.
To connect to a gRPC server with TLS, use the WithGRPCDialOption option with the appropriate gRPC credentials configuration. See https://pkg.go.dev/google.golang.org/grpc#WithTransportCredentials
type Option ¶
type Option func(*clientBuilder)
func WithGRPCDialOption ¶
func WithGRPCDialOption(opt ggrpc.DialOption) Option
WithGRPCDialOption allows passing lower-level gRPC dial options through to the gRPC dialer when creating the client.
func WithInsecure ¶
func WithInsecure() Option
WithInsecure disables transport security for the underlying client connection.
A shortcut for using grpc.WithTransportCredentials and insecure.NewCredentials from google.golang.org/grpc.
func WithPruningServiceEnabled ¶
WithPruningServiceEnabled allows control of whether or not to create a client for interacting with the pruning service of a CometBFT node.
If disabled and the client attempts to access the pruning service API, the client will panic.
type PruningServiceClient ¶
type PruningServiceClient interface { SetBlockRetainHeight(ctx context.Context, height uint64) error GetBlockRetainHeight(ctx context.Context) (RetainHeights, error) SetBlockResultsRetainHeight(ctx context.Context, height uint64) error GetBlockResultsRetainHeight(ctx context.Context) (uint64, error) SetTxIndexerRetainHeight(ctx context.Context, height uint64) error GetTxIndexerRetainHeight(ctx context.Context) (uint64, error) SetBlockIndexerRetainHeight(ctx context.Context, height uint64) error GetBlockIndexerRetainHeight(ctx context.Context) (uint64, error) }
type RetainHeights ¶
RetainHeights provides information on which block height limits have been set for block information to be retained by the ABCI application and the pruning service.