utils

package
v0.62.1 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LivenessPath    = "/live"
	MetricsPath     = "/metrics"
	EmulatorApiPath = "/emulator/"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockResponse

type BlockResponse struct {
	Height  int    `json:"height"`
	BlockId string `json:"blockId"`
	Context string `json:"context,omitempty"`
}

type EmulatorAPIServer

type EmulatorAPIServer struct {
	// contains filtered or unexported fields
}

func NewEmulatorAPIServer

func NewEmulatorAPIServer(emulator emulator.Emulator, adapter *adapters.AccessAdapter) *EmulatorAPIServer

func (EmulatorAPIServer) CodeCoverage

func (m EmulatorAPIServer) CodeCoverage(w http.ResponseWriter, r *http.Request)

func (EmulatorAPIServer) CommitBlock

func (m EmulatorAPIServer) CommitBlock(w http.ResponseWriter, r *http.Request)

func (EmulatorAPIServer) Config

func (EmulatorAPIServer) Logs added in v0.53.0

func (EmulatorAPIServer) ResetCodeCoverage

func (m EmulatorAPIServer) ResetCodeCoverage(w http.ResponseWriter, r *http.Request)

func (EmulatorAPIServer) Rollback

func (m EmulatorAPIServer) Rollback(w http.ResponseWriter, r *http.Request)

func (EmulatorAPIServer) ServeHTTP

func (m EmulatorAPIServer) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (EmulatorAPIServer) SnapshotCreate

func (m EmulatorAPIServer) SnapshotCreate(w http.ResponseWriter, r *http.Request)

func (EmulatorAPIServer) SnapshotJump

func (m EmulatorAPIServer) SnapshotJump(w http.ResponseWriter, r *http.Request)

func (EmulatorAPIServer) SnapshotList

func (m EmulatorAPIServer) SnapshotList(w http.ResponseWriter, _ *http.Request)

type HTTPHeader

type HTTPHeader struct {
	Key   string
	Value string
}

type HTTPServer

type HTTPServer struct {
	// contains filtered or unexported fields
}

func NewAdminServer

func NewAdminServer(
	logger *zerolog.Logger,
	emulator emulator.Emulator,
	adapter *adapters.AccessAdapter,
	grpcServer *access.GRPCServer,
	liveness *LivenessTicker,
	host string,
	port int,
	headers []HTTPHeader,
) *HTTPServer

func (*HTTPServer) Listen

func (h *HTTPServer) Listen() error

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()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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