Documentation ¶
Index ¶
- Constants
- func NewGetIdentityCommand(idProvider module.IdentityProvider) commands.AdminCommand
- func NewReadProtocolStateBlocksCommand(state protocol.State, storage storage.Blocks) commands.AdminCommand
- type GetConfigCommand
- type GetIdentityCommand
- type ListConfigCommand
- type ReadProtocolStateBlocksCommand
- type SetConfigCommand
- type SetGologLevelCommand
- type SetLogLevelCommand
Constants ¶
const ( FlowID getIdentityRequestType = iota PeerID )
const ( ID requestType = iota Height Final Sealed )
Variables ¶
This section is empty.
Functions ¶
func NewGetIdentityCommand ¶
func NewGetIdentityCommand(idProvider module.IdentityProvider) commands.AdminCommand
Types ¶
type GetConfigCommand ¶
type GetConfigCommand struct {
// contains filtered or unexported fields
}
GetConfigCommand is an admin command which retrieves the current value of a dynamically updatable config.
func NewGetConfigCommand ¶
func NewGetConfigCommand(configs *updatable_configs.Manager) *GetConfigCommand
func (*GetConfigCommand) Handler ¶
func (s *GetConfigCommand) Handler(_ context.Context, req *admin.CommandRequest) (interface{}, error)
func (*GetConfigCommand) Validator ¶
func (s *GetConfigCommand) Validator(req *admin.CommandRequest) error
Validator validates the request. Returns admin.InvalidAdminReqError for invalid/malformed requests.
type GetIdentityCommand ¶
type GetIdentityCommand struct {
// contains filtered or unexported fields
}
func (*GetIdentityCommand) Handler ¶
func (r *GetIdentityCommand) Handler(ctx context.Context, req *admin.CommandRequest) (interface{}, error)
func (*GetIdentityCommand) Validator ¶
func (r *GetIdentityCommand) Validator(req *admin.CommandRequest) error
Validator validates the request. Returns admin.InvalidAdminReqError for invalid/malformed requests.
type ListConfigCommand ¶
type ListConfigCommand struct {
// contains filtered or unexported fields
}
ListConfigCommand is an admin command which lists all config fields which may by dynamically modified via admin command.
func NewListConfigCommand ¶
func NewListConfigCommand(configs *updatable_configs.Manager) *ListConfigCommand
func (*ListConfigCommand) Handler ¶
func (s *ListConfigCommand) Handler(_ context.Context, _ *admin.CommandRequest) (interface{}, error)
func (*ListConfigCommand) Validator ¶
func (s *ListConfigCommand) Validator(req *admin.CommandRequest) error
type ReadProtocolStateBlocksCommand ¶
type ReadProtocolStateBlocksCommand struct {
// contains filtered or unexported fields
}
func (*ReadProtocolStateBlocksCommand) Handler ¶
func (r *ReadProtocolStateBlocksCommand) Handler(_ context.Context, req *admin.CommandRequest) (interface{}, error)
func (*ReadProtocolStateBlocksCommand) Validator ¶
func (r *ReadProtocolStateBlocksCommand) Validator(req *admin.CommandRequest) error
Validator validates the request. Returns admin.InvalidAdminReqError for invalid/malformed requests.
type SetConfigCommand ¶
type SetConfigCommand struct {
// contains filtered or unexported fields
}
SetConfigCommand is an admin command which enables setting any config field which has registered as dynamically updatable with the config Manager.
func NewSetConfigCommand ¶
func NewSetConfigCommand(configs *updatable_configs.Manager) *SetConfigCommand
func (*SetConfigCommand) Handler ¶
func (s *SetConfigCommand) Handler(_ context.Context, req *admin.CommandRequest) (interface{}, error)
func (*SetConfigCommand) Validator ¶
func (s *SetConfigCommand) Validator(req *admin.CommandRequest) error
Validator validates the request. Returns admin.InvalidAdminReqError for invalid/malformed requests.
type SetGologLevelCommand ¶
type SetGologLevelCommand struct{}
func (*SetGologLevelCommand) Handler ¶
func (s *SetGologLevelCommand) Handler(ctx context.Context, req *admin.CommandRequest) (interface{}, error)
func (*SetGologLevelCommand) Validator ¶
func (s *SetGologLevelCommand) Validator(req *admin.CommandRequest) error
type SetLogLevelCommand ¶
type SetLogLevelCommand struct{}
func (*SetLogLevelCommand) Handler ¶
func (s *SetLogLevelCommand) Handler(_ context.Context, req *admin.CommandRequest) (interface{}, error)
func (*SetLogLevelCommand) Validator ¶
func (s *SetLogLevelCommand) Validator(req *admin.CommandRequest) error
Validator validates the request. Returns admin.InvalidAdminReqError for invalid/malformed requests.