Documentation ¶
Index ¶
- Constants
- func CustomGRPCHeaderMatcher(key string) (string, bool)
- func Execute()
- func ExportConfigHandler(ctx context.Context) http.HandlerFunc
- func ExportEnv(ctx context.Context) http.HandlerFunc
- func ExportLogHandler(ctx context.Context) http.HandlerFunc
- func GetArgs(ctx context.Context) (types.AccAddress, uint64, uint64, string, utils.CallData, error)
- func Handle404() http.Handler
- func HealthCheckHandler(ctx context.Context) http.HandlerFunc
- func SetupRegisterCenter(f func(err error, lg log.Logger))
- type ConfigFiles
- type HeightParams
- type QueryParams
- type Res
- type ResBlock
- type Response
- type RestServer
Constants ¶
View Source
const ( FlagListenAddr = "laddr" FlagMaxOpenConnections = "max-open" FlagRPCReadTimeout = "read-timeout" FlagRPCWriteTimeout = "write-timeout" FlagWebsocket = "wsport" GenesisFile = "genesis.json" PrivValidatorKey = "priv_validator_key.json" )
View Source
const CorePrefix = "/core"
Variables ¶
This section is empty.
Functions ¶
func CustomGRPCHeaderMatcher ¶
CustomGRPCHeaderMatcher for mapping request headers to GRPC metadata. HTTP headers that start with 'Grpc-Metadata-' are automatically mapped to gRPC metadata after removing prefix 'Grpc-Metadata-'. We can use this CustomGRPCHeaderMatcher if headers don't start with `Grpc-Metadata-`
func ExportConfigHandler ¶
func ExportConfigHandler(ctx context.Context) http.HandlerFunc
func ExportLogHandler ¶
func ExportLogHandler(ctx context.Context) http.HandlerFunc
func HealthCheckHandler ¶
func HealthCheckHandler(ctx context.Context) http.HandlerFunc
func SetupRegisterCenter ¶
Types ¶
type ConfigFiles ¶
type HeightParams ¶
type HeightParams struct {
Height string `json:"height"`
}
type QueryParams ¶
type QueryParams struct {
Data HeightParams `json:"data"`
}
type Res ¶
type Res struct { Ret uint32 `json:"ret"` Data ctypes.ResultBlock `json:"data"` Message string `json:"message"` }
type ResBlock ¶
type ResBlock ctypes.ResultBlock
type RestServer ¶
type RestServer struct { Mux *mux.Router GRPCGatewayRouter *runtime.ServeMux CliCtx context.Context // contains filtered or unexported fields }
RestServer represents the Light Client Rest server
func NewRestServer ¶
func NewRestServer() *RestServer
Source Files ¶
Click to show internal directories.
Click to hide internal directories.