Documentation ¶
Index ¶
- Variables
- func MarshalChannel(cdc *codec.CodecProxy, c *types.Channel) ([]byte, error)
- func MustMarshalChannel(cdc *codec.CodecProxy, c *types.Channel) []byte
- func MustMarshalConnection(cdc *codec.CodecProxy, c *conntypes.ConnectionEnd) []byte
- func MustUnmarshalChannel(cdc *codec.CodecProxy, data []byte) *types.Channel
- func MustUnmarshalConnection(cdc *codec.CodecProxy, data []byte) *conntypes.ConnectionEnd
- func UnmarshalConnection(cdc *codec.CodecProxy, data []byte) (*conntypes.ConnectionEnd, error)
- type CommonHeightSelector
- type SelectVersion
- type Selector
- type SelectorFactory
- type SelectorStrategy
- type Selectors
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultFactory = func(higherThan func(h int64) bool, version SelectVersion, internal interface{}) SelectorFactory { return func() Selector { return NewCommonHeightSelector(higherThan, version, internal) } } )
Functions ¶
func MarshalChannel ¶
func MustMarshalChannel ¶
func MustMarshalChannel(cdc *codec.CodecProxy, c *types.Channel) []byte
func MustMarshalConnection ¶
func MustMarshalConnection(cdc *codec.CodecProxy, c *conntypes.ConnectionEnd) []byte
func MustUnmarshalChannel ¶
func MustUnmarshalChannel(cdc *codec.CodecProxy, data []byte) *types.Channel
func MustUnmarshalConnection ¶
func MustUnmarshalConnection(cdc *codec.CodecProxy, data []byte) *conntypes.ConnectionEnd
func UnmarshalConnection ¶
func UnmarshalConnection(cdc *codec.CodecProxy, data []byte) (*conntypes.ConnectionEnd, error)
Types ¶
type CommonHeightSelector ¶
type CommonHeightSelector struct {
// contains filtered or unexported fields
}
func NewCommonHeightSelector ¶
func NewCommonHeightSelector(higherThan func(h int64) bool, version SelectVersion, internal interface{}) *CommonHeightSelector
func (*CommonHeightSelector) Select ¶
func (c *CommonHeightSelector) Select(ctx sdk.Context) (interface{}, bool)
func (*CommonHeightSelector) Version ¶
func (c *CommonHeightSelector) Version() SelectVersion
type SelectVersion ¶
type SelectVersion float64
type Selector ¶
type Selector interface { Version() SelectVersion Select(ctx sdk.Context) (interface{}, bool) }
TODO,use genesis
type SelectorFactory ¶
type SelectorFactory func() Selector
type SelectorStrategy ¶
type SelectorStrategy struct {
// contains filtered or unexported fields
}
func NewSelectorStrategy ¶
func NewSelectorStrategy(internal interface{}) *SelectorStrategy
func (*SelectorStrategy) GetInternal ¶
func (f *SelectorStrategy) GetInternal() interface{}
func (*SelectorStrategy) GetProxy ¶
func (f *SelectorStrategy) GetProxy(ctx sdk.Context) interface{}
func (*SelectorStrategy) RegisterSelectors ¶
func (f *SelectorStrategy) RegisterSelectors(factories ...SelectorFactory)
func (*SelectorStrategy) Seal ¶
func (f *SelectorStrategy) Seal()
func (*SelectorStrategy) Seald ¶
func (f *SelectorStrategy) Seald() bool
Click to show internal directories.
Click to hide internal directories.