keeper

package
v0.0.0-...-78eb55b Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Keeper

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

Keeper defines ibc-dns keeper

func NewKeeper

func NewKeeper(
	cdc codec.BinaryMarshaler,
	storeKey sdk.StoreKey,
	clientKeeper types.ClientKeeper,
	connectionKeeper types.ConnectionKeeper,
	channelKeeper types.ChannelKeeper,
	scopedKeeper capabilitykeeper.ScopedKeeper,
) Keeper

NewKeeper creates a new ibc-dns Keeper

func (Keeper) Codec

func (k Keeper) Codec() codec.BinaryMarshaler

func (Keeper) GetSelfDomainName

func (k Keeper) GetSelfDomainName(ctx sdk.Context, dnsID types.LocalDNSID) (string, bool)

GetSelfDomainName returns self-domain name

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

Logger returns a module-specific logger.

func (Keeper) ReceiveDomainAssociationCreatePacketAcknowledgement

func (k Keeper) ReceiveDomainAssociationCreatePacketAcknowledgement(ctx sdk.Context, status uint32) error

ReceiveDomainAssociationCreatePacketAcknowledgement receive an ack

func (Keeper) ReceiveDomainAssociationResultPacketData

func (k Keeper) ReceiveDomainAssociationResultPacketData(
	ctx sdk.Context,
	packet channeltypes.Packet,
	data *servertypes.DomainAssociationResultPacketData,
) error

ReceiveDomainAssociationResultPacketData receives a packet to save a domain info on local state

func (Keeper) ReceiveRegisterDomainPacketAcknowledgement

func (k Keeper) ReceiveRegisterDomainPacketAcknowledgement(ctx sdk.Context, status uint32, domain string, packet channeltypes.Packet) error

ReceiveRegisterDomainPacketAcknowledgement receive an ack to set self-domain name

func (Keeper) RegisterDomain

func (Keeper) ResolveChannel

func (k Keeper) ResolveChannel(ctx sdk.Context, domain types.LocalDomain, portID string) (channeltypes.Channel, bool)

ResolveChannel returns the channel corresponding to given a domain info

func (Keeper) ResolveDNSID

func (k Keeper) ResolveDNSID(ctx sdk.Context, domain types.LocalDomain) (types.LocalDNSID, bool)

ResolveDNSID returns local DNS-ID corresponding to given a domain info

func (Keeper) SendDomainAssociationCreatePacketData

func (k Keeper) SendDomainAssociationCreatePacketData(
	ctx sdk.Context,
	dnsID types.LocalDNSID,
	srcClient types.ClientDomain,
	dstClient types.ClientDomain,
) (*channeltypes.Packet, error)

SendDomainAssociationCreatePacketData sends a packet to associate a domain with client on DNS server

func (Keeper) SendPacketRegisterDomain

func (k Keeper) SendPacketRegisterDomain(
	ctx sdk.Context,
	name string,
	sourcePort string,
	sourceChannel string,
	metadata []byte,
) (*channeltypes.Packet, error)

SendPacketRegisterDomain sends a packet to register a channel name on DNS server

func (Keeper) SetDomainChannel

func (k Keeper) SetDomainChannel(ctx sdk.Context, dnsID types.LocalDNSID, domainName string, channel types.LocalChannel) error

SetDomainChannel sets a channel corresponding with the domain name

Jump to

Keyboard shortcuts

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