Documentation ¶
Index ¶
Constants ¶
View Source
const ( LivenessPath = "/live" MetricsPath = "/metrics" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BadgerStorage ¶
type BadgerStorage struct {
// contains filtered or unexported fields
}
func NewBadgerStorage ¶
func (*BadgerStorage) Start ¶
func (s *BadgerStorage) Start() error
func (*BadgerStorage) Stop ¶
func (s *BadgerStorage) Stop()
func (*BadgerStorage) Store ¶
func (s *BadgerStorage) Store() storage.Store
type BlocksTicker ¶
type BlocksTicker struct {
// contains filtered or unexported fields
}
func NewBlocksTicker ¶
func NewBlocksTicker( backend *backend.Backend, blockTime time.Duration, ) *BlocksTicker
func (*BlocksTicker) Start ¶
func (t *BlocksTicker) Start() error
func (*BlocksTicker) Stop ¶
func (t *BlocksTicker) Stop()
type Config ¶
type Config struct { GRPCPort int GRPCDebug bool HTTPPort int HTTPHeaders []HTTPHeader BlockTime time.Duration ServicePublicKey crypto.PublicKey ServiceKeySigAlgo crypto.SignatureAlgorithm ServiceKeyHashAlgo crypto.HashAlgorithm GenesisTokenSupply cadence.UFix64 TransactionExpiry uint TransactionMaxGasLimit uint64 ScriptGasLimit uint64 Persist bool // DBPath is the path to the Badger database on disk. DBPath string // DBGCInterval is the time interval at which to garbage collect the Badger value log. DBGCInterval time.Duration // DBGCDiscardRatio is the ratio of space to reclaim during a Badger garbage collection run. DBGCDiscardRatio float64 // LivenessCheckTolerance is the time interval in which the server must respond to liveness probes. LivenessCheckTolerance time.Duration }
Config is the configuration for an emulator server.
type EmulatorServer ¶
type EmulatorServer struct {
// contains filtered or unexported fields
}
EmulatorServer is a local server that runs a Flow Emulator instance.
The server wraps an emulated blockchain instance with the Access API gRPC handlers.
func NewEmulatorServer ¶
func NewEmulatorServer(logger *logrus.Logger, conf *Config) *EmulatorServer
NewEmulatorServer creates a new instance of a Flow Emulator server.
func (*EmulatorServer) Start ¶
func (s *EmulatorServer) Start()
Start starts the Flow Emulator server.
func (*EmulatorServer) Stop ¶
func (s *EmulatorServer) Stop()
type GRPCServer ¶
type GRPCServer struct {
// contains filtered or unexported fields
}
func NewGRPCServer ¶
func (*GRPCServer) Server ¶
func (g *GRPCServer) Server() *grpc.Server
func (*GRPCServer) Start ¶
func (g *GRPCServer) Start() error
func (*GRPCServer) Stop ¶
func (g *GRPCServer) Stop()
type HTTPHeader ¶
type HTTPServer ¶
type HTTPServer struct {
// contains filtered or unexported fields
}
func NewHTTPServer ¶
func NewHTTPServer( grpcServer *GRPCServer, liveness *LivenessTicker, port int, headers []HTTPHeader, ) *HTTPServer
func (*HTTPServer) Start ¶
func (h *HTTPServer) Start() error
func (*HTTPServer) Stop ¶
func (h *HTTPServer) Stop()
type LivenessTicker ¶
type LivenessTicker struct {
// contains filtered or unexported fields
}
func NewLivenessTicker ¶
func NewLivenessTicker(tolerance time.Duration) *LivenessTicker
func (*LivenessTicker) Handler ¶
func (l *LivenessTicker) Handler() http.Handler
func (*LivenessTicker) Start ¶
func (l *LivenessTicker) Start() error
func (*LivenessTicker) Stop ¶
func (l *LivenessTicker) Stop()
type MemoryStorage ¶
type MemoryStorage struct {
// contains filtered or unexported fields
}
func NewMemoryStorage ¶
func NewMemoryStorage() *MemoryStorage
func (*MemoryStorage) Start ¶
func (s *MemoryStorage) Start() error
func (*MemoryStorage) Stop ¶
func (s *MemoryStorage) Stop()
func (*MemoryStorage) Store ¶
func (s *MemoryStorage) Store() storage.Store
Click to show internal directories.
Click to hide internal directories.