apphost

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2024 License: MIT Imports: 20 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConnectionsThreshold = -1

Functions

This section is empty.

Types

type Adapter

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

func (*Adapter) Close

func (api *Adapter) Close() error

func (*Adapter) ConnAccept

func (api *Adapter) ConnAccept(service string) (data string, err error)

func (*Adapter) ConnClose

func (api *Adapter) ConnClose(id string) (err error)

func (*Adapter) ConnRead

func (api *Adapter) ConnRead(id string) (data string, err error)

func (*Adapter) ConnWrite

func (api *Adapter) ConnWrite(id string, data string) (err error)

func (*Adapter) Connections

func (api *Adapter) Connections() (c []target.ApphostConn)

func (*Adapter) Events

func (api *Adapter) Events() *sig.Queue[target.ApphostEvent]

func (*Adapter) Interrupt

func (api *Adapter) Interrupt()

func (*Adapter) Listeners

func (api *Adapter) Listeners() (l []target.ApphostListener)

func (*Adapter) Log

func (api *Adapter) Log(arg ...any)

func (*Adapter) LogArr

func (api *Adapter) LogArr(arg []any)

func (*Adapter) NodeInfo

func (api *Adapter) NodeInfo(identity string) (info target.NodeInfo, err error)

func (*Adapter) Port

func (api *Adapter) Port(service ...string) string

func (*Adapter) Query

func (api *Adapter) Query(identity string, query string) (data string, err error)

func (*Adapter) QueryName

func (api *Adapter) QueryName(name string, query string) (data string, err error)

func (*Adapter) Resolve

func (api *Adapter) Resolve(name string) (id string, err error)

func (*Adapter) ServiceClose

func (api *Adapter) ServiceClose(service string) (err error)

func (*Adapter) ServiceRegister

func (api *Adapter) ServiceRegister(service string) (err error)

func (*Adapter) Sleep

func (api *Adapter) Sleep(duration int64)

type Conn

type Conn struct {
	*bufio.Reader
	io.WriteCloser
	// contains filtered or unexported fields
}

type Factory

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

func NewFactory

func NewFactory(invoke target.Dispatch) *Factory

func (Factory) NewAdapter

func (f Factory) NewAdapter(ctx context.Context, portal target.Portal_) target.Apphost

func (Factory) WithTimeout

func (f Factory) WithTimeout(ctx context.Context, portal target.Portal_) target.Apphost

type Invoker

type Invoker struct {
	*Adapter
	// contains filtered or unexported fields
}

func NewInvoker

func NewInvoker(
	ctx context.Context,
	flat *Adapter,
	invoke target.Dispatch,
) (i *Invoker)

func (*Invoker) Close

func (inv *Invoker) Close() error

func (*Invoker) Query

func (inv *Invoker) Query(identity string, query string) (data string, err error)

type Listener

type Listener struct {
	*astral.Listener
	// contains filtered or unexported fields
}

type Timout

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

func NewTimout

func NewTimout(timeout time.Duration, onTimeout func()) *Timout

func (*Timout) Enable

func (t *Timout) Enable(value bool)

func (*Timout) Start

func (t *Timout) Start()

func (*Timout) Stop

func (t *Timout) Stop()

Jump to

Keyboard shortcuts

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