Documentation ¶
Index ¶
- Variables
- type Common
- type CommonMethods
- type CommonStruct
- func (s *CommonStruct) Closing(p0 context.Context) (<-chan struct{}, error)
- func (s *CommonStruct) LogList(p0 context.Context) ([]string, error)
- func (s *CommonStruct) LogSetLevel(p0 context.Context, p1 string, p2 string) error
- func (s *CommonStruct) Session(p0 context.Context) (uuid.UUID, error)
- func (s *CommonStruct) Shutdown(p0 context.Context) error
- func (s *CommonStruct) Version(p0 context.Context) (sharedTypes.Version, error)
- type CommonStub
- func (s *CommonStub) Closing(p0 context.Context) (<-chan struct{}, error)
- func (s *CommonStub) LogList(p0 context.Context) ([]string, error)
- func (s *CommonStub) LogSetLevel(p0 context.Context, p1 string, p2 string) error
- func (s *CommonStub) Session(p0 context.Context) (uuid.UUID, error)
- func (s *CommonStub) Shutdown(p0 context.Context) error
- func (s *CommonStub) Version(p0 context.Context) (sharedTypes.Version, error)
- type MinerAPI
- type MinerAPIMethods
- type MinerAPIStruct
- func (s *MinerAPIStruct) CountWinners(p0 context.Context, p1 []address.Address, p2 abi.ChainEpoch, p3 abi.ChainEpoch) ([]types.CountWinners, error)
- func (s *MinerAPIStruct) ListAddress(p0 context.Context) ([]types.MinerInfo, error)
- func (s *MinerAPIStruct) ListBlocks(p0 context.Context, p1 *types.BlocksQueryParams) ([]types.MinedBlock, error)
- func (s *MinerAPIStruct) QueryRecord(p0 context.Context, p1 *types.QueryRecordParams) ([]map[string]string, error)
- func (s *MinerAPIStruct) Start(p0 context.Context, p1 []address.Address) error
- func (s *MinerAPIStruct) StatesForMining(p0 context.Context, p1 []address.Address) ([]types.MinerState, error)
- func (s *MinerAPIStruct) Stop(p0 context.Context, p1 []address.Address) error
- func (s *MinerAPIStruct) UpdateAddress(p0 context.Context, p1 int64, p2 int64) ([]types.MinerInfo, error)
- func (s *MinerAPIStruct) WarmupForMiner(p0 context.Context, p1 address.Address) error
- type MinerAPIStub
- func (s *MinerAPIStub) CountWinners(p0 context.Context, p1 []address.Address, p2 abi.ChainEpoch, p3 abi.ChainEpoch) ([]types.CountWinners, error)
- func (s *MinerAPIStub) ListAddress(p0 context.Context) ([]types.MinerInfo, error)
- func (s *MinerAPIStub) ListBlocks(p0 context.Context, p1 *types.BlocksQueryParams) ([]types.MinedBlock, error)
- func (s *MinerAPIStub) QueryRecord(p0 context.Context, p1 *types.QueryRecordParams) ([]map[string]string, error)
- func (s *MinerAPIStub) Start(p0 context.Context, p1 []address.Address) error
- func (s *MinerAPIStub) StatesForMining(p0 context.Context, p1 []address.Address) ([]types.MinerState, error)
- func (s *MinerAPIStub) Stop(p0 context.Context, p1 []address.Address) error
- func (s *MinerAPIStub) UpdateAddress(p0 context.Context, p1 int64, p2 int64) ([]types.MinerInfo, error)
- func (s *MinerAPIStub) WarmupForMiner(p0 context.Context, p1 address.Address) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotSupported = errors.New("method not supported")
Functions ¶
This section is empty.
Types ¶
type Common ¶
type Common interface { // Version provides information about API provider Version(context.Context) (sharedTypes.Version, error) //perm:read LogList(context.Context) ([]string, error) //perm:write LogSetLevel(context.Context, string, string) error //perm:write // trigger graceful shutdown Shutdown(context.Context) error //perm:admin // Session returns a random UUID of api provider session Session(context.Context) (uuid.UUID, error) //perm:read Closing(context.Context) (<-chan struct{}, error) //perm:read }
type CommonMethods ¶
type CommonMethods struct { Closing func(p0 context.Context) (<-chan struct{}, error) `perm:"read"` LogList func(p0 context.Context) ([]string, error) `perm:"write"` LogSetLevel func(p0 context.Context, p1 string, p2 string) error `perm:"write"` Session func(p0 context.Context) (uuid.UUID, error) `perm:"read"` Shutdown func(p0 context.Context) error `perm:"admin"` Version func(p0 context.Context) (sharedTypes.Version, error) `perm:"read"` }
type CommonStruct ¶
type CommonStruct struct {
Internal CommonMethods
}
func (*CommonStruct) Closing ¶
func (s *CommonStruct) Closing(p0 context.Context) (<-chan struct{}, error)
func (*CommonStruct) LogSetLevel ¶
func (*CommonStruct) Version ¶
func (s *CommonStruct) Version(p0 context.Context) (sharedTypes.Version, error)
type CommonStub ¶
type CommonStub struct { }
func (*CommonStub) Closing ¶
func (s *CommonStub) Closing(p0 context.Context) (<-chan struct{}, error)
func (*CommonStub) LogSetLevel ¶
func (*CommonStub) Version ¶
func (s *CommonStub) Version(p0 context.Context) (sharedTypes.Version, error)
type MinerAPI ¶
type MinerAPI interface { Common UpdateAddress(context.Context, int64, int64) ([]types.MinerInfo, error) //perm:admin ListAddress(context.Context) ([]types.MinerInfo, error) //perm:read StatesForMining(context.Context, []address.Address) ([]types.MinerState, error) //perm:read CountWinners(context.Context, []address.Address, abi.ChainEpoch, abi.ChainEpoch) ([]types.CountWinners, error) //perm:read ListBlocks(ctx context.Context, params *types.BlocksQueryParams) ([]types.MinedBlock, error) //perm:read WarmupForMiner(context.Context, address.Address) error //perm:write Start(context.Context, []address.Address) error //perm:admin Stop(context.Context, []address.Address) error //perm:admin QueryRecord(ctx context.Context, params *types.QueryRecordParams) ([]map[string]string, error) //perm:read }
type MinerAPIMethods ¶
type MinerAPIMethods struct { CountWinners func(p0 context.Context, p1 []address.Address, p2 abi.ChainEpoch, p3 abi.ChainEpoch) ([]types.CountWinners, error) `perm:"read"` ListAddress func(p0 context.Context) ([]types.MinerInfo, error) `perm:"read"` ListBlocks func(p0 context.Context, p1 *types.BlocksQueryParams) ([]types.MinedBlock, error) `perm:"read"` QueryRecord func(p0 context.Context, p1 *types.QueryRecordParams) ([]map[string]string, error) `perm:"read"` Start func(p0 context.Context, p1 []address.Address) error `perm:"admin"` StatesForMining func(p0 context.Context, p1 []address.Address) ([]types.MinerState, error) `perm:"read"` Stop func(p0 context.Context, p1 []address.Address) error `perm:"admin"` UpdateAddress func(p0 context.Context, p1 int64, p2 int64) ([]types.MinerInfo, error) `perm:"admin"` WarmupForMiner func(p0 context.Context, p1 address.Address) error `perm:"write"` }
type MinerAPIStruct ¶
type MinerAPIStruct struct { CommonStruct Internal MinerAPIMethods }
func (*MinerAPIStruct) CountWinners ¶
func (s *MinerAPIStruct) CountWinners(p0 context.Context, p1 []address.Address, p2 abi.ChainEpoch, p3 abi.ChainEpoch) ([]types.CountWinners, error)
func (*MinerAPIStruct) ListAddress ¶
func (*MinerAPIStruct) ListBlocks ¶ added in v1.13.0
func (s *MinerAPIStruct) ListBlocks(p0 context.Context, p1 *types.BlocksQueryParams) ([]types.MinedBlock, error)
func (*MinerAPIStruct) QueryRecord ¶ added in v1.13.0
func (s *MinerAPIStruct) QueryRecord(p0 context.Context, p1 *types.QueryRecordParams) ([]map[string]string, error)
func (*MinerAPIStruct) Start ¶
func (s *MinerAPIStruct) Start(p0 context.Context, p1 []address.Address) error
func (*MinerAPIStruct) StatesForMining ¶
func (s *MinerAPIStruct) StatesForMining(p0 context.Context, p1 []address.Address) ([]types.MinerState, error)
func (*MinerAPIStruct) Stop ¶
func (s *MinerAPIStruct) Stop(p0 context.Context, p1 []address.Address) error
func (*MinerAPIStruct) UpdateAddress ¶
func (*MinerAPIStruct) WarmupForMiner ¶
func (s *MinerAPIStruct) WarmupForMiner(p0 context.Context, p1 address.Address) error
type MinerAPIStub ¶
type MinerAPIStub struct {
CommonStub
}
func (*MinerAPIStub) CountWinners ¶
func (s *MinerAPIStub) CountWinners(p0 context.Context, p1 []address.Address, p2 abi.ChainEpoch, p3 abi.ChainEpoch) ([]types.CountWinners, error)
func (*MinerAPIStub) ListAddress ¶
func (*MinerAPIStub) ListBlocks ¶ added in v1.13.0
func (s *MinerAPIStub) ListBlocks(p0 context.Context, p1 *types.BlocksQueryParams) ([]types.MinedBlock, error)
func (*MinerAPIStub) QueryRecord ¶ added in v1.13.0
func (s *MinerAPIStub) QueryRecord(p0 context.Context, p1 *types.QueryRecordParams) ([]map[string]string, error)
func (*MinerAPIStub) Start ¶
func (s *MinerAPIStub) Start(p0 context.Context, p1 []address.Address) error
func (*MinerAPIStub) StatesForMining ¶
func (s *MinerAPIStub) StatesForMining(p0 context.Context, p1 []address.Address) ([]types.MinerState, error)
func (*MinerAPIStub) Stop ¶
func (s *MinerAPIStub) Stop(p0 context.Context, p1 []address.Address) error
func (*MinerAPIStub) UpdateAddress ¶
func (*MinerAPIStub) WarmupForMiner ¶
func (s *MinerAPIStub) WarmupForMiner(p0 context.Context, p1 address.Address) error
Click to show internal directories.
Click to hide internal directories.