method

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

This package defines the structures for a stage to connect and invoke a remote method.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

type Conn interface {
	Call(ctx context.Context, req message.Instance) (message.Instance, error)
	Close() error
}

Conn represents an rpc connection with a remote method that can be used to call the method.

type Desc

type Desc interface {
	Dialer
	Input() message.Type
	Output() message.Type
}

Desc describes a method.

type DialFunc

type DialFunc func() (Conn, error)

func (DialFunc) Dial

func (fn DialFunc) Dial() (Conn, error)

type Dialer

type Dialer interface {
	Dial() (Conn, error)
}

Dialer creates a connection with the method to execute

type ResolveFunc

type ResolveFunc func(ctx context.Context, address string) (Desc, error)

func (ResolveFunc) Resolve

func (fn ResolveFunc) Resolve(ctx context.Context, address string) (Desc, error)

type Resolver

type Resolver interface {
	Resolve(ctx context.Context, address string) (Desc, error)
}

Jump to

Keyboard shortcuts

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