interop

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: LGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FlagInteropNodePort      = "interop-node-port"
	ReconnectInterval        = 10 * time.Second
	ErrInteropClientNotReady = "interop client not ready"
)

Variables

View Source
var (
	ErrInvalidLengthService        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowService          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupService = fmt.Errorf("proto: unexpected end of group")
)

Functions

func RegisterInteropServer

func RegisterInteropServer(s grpc1.Server, srv InteropServer)

Types

type InteropClient

type InteropClient interface {
	// OwnerOf returns the owner of a token on a foreign chain.
	OwnerOf(ctx context.Context, in *OwnerOfRequest, opts ...grpc.CallOption) (*OwnerOfResponse, error)
}

InteropClient is the client API for Interop service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewInteropClient

func NewInteropClient(cc grpc1.ClientConn) InteropClient

type InteropClientFactory added in v0.0.4

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

func NewInteropClientFactory added in v0.0.4

func NewInteropClientFactory(log log.Logger, port uint16) *InteropClientFactory

func (*InteropClientFactory) GetInteropClient added in v0.0.4

func (w *InteropClientFactory) GetInteropClient() InteropClient

type InteropServer

type InteropServer interface {
	// OwnerOf returns the owner of a token on a foreign chain.
	OwnerOf(context.Context, *OwnerOfRequest) (*OwnerOfResponse, error)
}

InteropServer is the server API for Interop service.

type OwnerOfRequest

type OwnerOfRequest struct {
	ChainId      string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
	ContractAddr string `protobuf:"bytes,2,opt,name=contract_addr,json=contractAddr,proto3" json:"contract_addr,omitempty"`
	TokenIdHex   string `protobuf:"bytes,3,opt,name=token_id_hex,json=tokenIdHex,proto3" json:"token_id_hex,omitempty"`
	BlockHash    string `protobuf:"bytes,4,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"`
}

OwnerOfRequest is the request for the OwnerOf RPC.

func (*OwnerOfRequest) Descriptor

func (*OwnerOfRequest) Descriptor() ([]byte, []int)

func (*OwnerOfRequest) GetBlockHash

func (m *OwnerOfRequest) GetBlockHash() string

func (*OwnerOfRequest) GetChainId

func (m *OwnerOfRequest) GetChainId() string

func (*OwnerOfRequest) GetContractAddr

func (m *OwnerOfRequest) GetContractAddr() string

func (*OwnerOfRequest) GetTokenIdHex

func (m *OwnerOfRequest) GetTokenIdHex() string

func (*OwnerOfRequest) Marshal

func (m *OwnerOfRequest) Marshal() (dAtA []byte, err error)

func (*OwnerOfRequest) MarshalTo

func (m *OwnerOfRequest) MarshalTo(dAtA []byte) (int, error)

func (*OwnerOfRequest) MarshalToSizedBuffer

func (m *OwnerOfRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*OwnerOfRequest) ProtoMessage

func (*OwnerOfRequest) ProtoMessage()

func (*OwnerOfRequest) Reset

func (m *OwnerOfRequest) Reset()

func (*OwnerOfRequest) Size

func (m *OwnerOfRequest) Size() (n int)

func (*OwnerOfRequest) String

func (m *OwnerOfRequest) String() string

func (*OwnerOfRequest) Unmarshal

func (m *OwnerOfRequest) Unmarshal(dAtA []byte) error

func (*OwnerOfRequest) XXX_DiscardUnknown

func (m *OwnerOfRequest) XXX_DiscardUnknown()

func (*OwnerOfRequest) XXX_Marshal

func (m *OwnerOfRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*OwnerOfRequest) XXX_Merge

func (m *OwnerOfRequest) XXX_Merge(src proto.Message)

func (*OwnerOfRequest) XXX_Size

func (m *OwnerOfRequest) XXX_Size() int

func (*OwnerOfRequest) XXX_Unmarshal

func (m *OwnerOfRequest) XXX_Unmarshal(b []byte) error

type OwnerOfResponse

type OwnerOfResponse struct {
	Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
}

OwnerOfResponse is the response for the OwnerOf RPC.

func (*OwnerOfResponse) Descriptor

func (*OwnerOfResponse) Descriptor() ([]byte, []int)

func (*OwnerOfResponse) GetOwner

func (m *OwnerOfResponse) GetOwner() string

func (*OwnerOfResponse) Marshal

func (m *OwnerOfResponse) Marshal() (dAtA []byte, err error)

func (*OwnerOfResponse) MarshalTo

func (m *OwnerOfResponse) MarshalTo(dAtA []byte) (int, error)

func (*OwnerOfResponse) MarshalToSizedBuffer

func (m *OwnerOfResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*OwnerOfResponse) ProtoMessage

func (*OwnerOfResponse) ProtoMessage()

func (*OwnerOfResponse) Reset

func (m *OwnerOfResponse) Reset()

func (*OwnerOfResponse) Size

func (m *OwnerOfResponse) Size() (n int)

func (*OwnerOfResponse) String

func (m *OwnerOfResponse) String() string

func (*OwnerOfResponse) Unmarshal

func (m *OwnerOfResponse) Unmarshal(dAtA []byte) error

func (*OwnerOfResponse) XXX_DiscardUnknown

func (m *OwnerOfResponse) XXX_DiscardUnknown()

func (*OwnerOfResponse) XXX_Marshal

func (m *OwnerOfResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*OwnerOfResponse) XXX_Merge

func (m *OwnerOfResponse) XXX_Merge(src proto.Message)

func (*OwnerOfResponse) XXX_Size

func (m *OwnerOfResponse) XXX_Size() int

func (*OwnerOfResponse) XXX_Unmarshal

func (m *OwnerOfResponse) XXX_Unmarshal(b []byte) error

type UnimplementedInteropServer

type UnimplementedInteropServer struct {
}

UnimplementedInteropServer can be embedded to have forward compatible implementations.

func (*UnimplementedInteropServer) OwnerOf

Jump to

Keyboard shortcuts

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