common

package
v1.7.0-browser Latest Latest
Warning

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

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

Documentation

Index

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 MarshalChannel(cdc *codec.CodecProxy, c *types.Channel) ([]byte, error)

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 added in v1.6.7

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

func NewCommonHeightSelector added in v1.6.7

func NewCommonHeightSelector(higherThan func(h int64) bool, version SelectVersion, internal interface{}) *CommonHeightSelector

func (*CommonHeightSelector) Select added in v1.6.7

func (c *CommonHeightSelector) Select(ctx sdk.Context) (interface{}, bool)

func (*CommonHeightSelector) Version added in v1.6.7

func (c *CommonHeightSelector) Version() SelectVersion

type SelectVersion added in v1.6.7

type SelectVersion float64

type Selector added in v1.6.7

type Selector interface {
	Version() SelectVersion
	Select(ctx sdk.Context) (interface{}, bool)
}

TODO,use genesis

type SelectorFactory added in v1.6.7

type SelectorFactory func() Selector

type SelectorStrategy added in v1.6.7

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

func NewSelectorStrategy added in v1.6.7

func NewSelectorStrategy(internal interface{}) *SelectorStrategy

func (*SelectorStrategy) GetInternal added in v1.6.7

func (f *SelectorStrategy) GetInternal() interface{}

func (*SelectorStrategy) GetProxy added in v1.6.7

func (f *SelectorStrategy) GetProxy(ctx sdk.Context) interface{}

func (*SelectorStrategy) RegisterSelectors added in v1.6.7

func (f *SelectorStrategy) RegisterSelectors(factories ...SelectorFactory)

func (*SelectorStrategy) Seal added in v1.6.7

func (f *SelectorStrategy) Seal()

func (*SelectorStrategy) Seald added in v1.6.7

func (f *SelectorStrategy) Seald() bool

type Selectors added in v1.6.7

type Selectors []Selector

func (Selectors) Len added in v1.6.7

func (m Selectors) Len() int

func (Selectors) Less added in v1.6.7

func (m Selectors) Less(i, j int) bool

func (Selectors) Swap added in v1.6.7

func (m Selectors) Swap(i, j int)

Jump to

Keyboard shortcuts

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