server

package
v100.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Listen

func Listen(addr string) (net.Listener, error)

Listen starts a new net.Listener on the given address.

The address must conform to the standard listener address format used by CometBFT, i.e. "<protocol>://<address>". For example, "tcp://127.0.0.1:26670".

func Serve

func Serve(listener net.Listener, opts ...Option) error

Serve constructs and runs a CometBFT gRPC server using the given listener and options.

This function only returns upon error, otherwise it blocks the current goroutine.

Types

type Option

type Option func(*serverBuilder)

Option is any function that allows for configuration of the gRPC server during its creation.

func WithBlockResultsService

func WithBlockResultsService(bs *store.BlockStore, ss sm.Store, logger log.Logger) Option

func WithBlockService

func WithBlockService(store *store.BlockStore, eventBus *types.EventBus, logger log.Logger) Option

WithBlockService enables the block service on the CometBFT server.

func WithGRPCOption

func WithGRPCOption(opt grpc.ServerOption) Option

WithGRPCOption allows one to specify Google gRPC server options during the construction of the CometBFT gRPC server.

func WithLogger

func WithLogger(logger log.Logger) Option

WithLogger enables logging using the given logger. If not specified, the gRPC server does not log anything.

func WithVersionService

func WithVersionService() Option

WithVersionService enables the version service on the CometBFT server.

Directories

Path Synopsis
services

Jump to

Keyboard shortcuts

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