messenger

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Messenger

type Messenger struct {
	HTTPC *http.Client

	MaxHandlers     int
	ErrorMaxBackoff time.Duration
	// contains filtered or unexported fields
}

func NewMessenger

func NewMessenger(
	ctx context.Context,
	requestsURL string,
	responsesURL string,
	maxHandlers int,
	errorMaxBackoff time.Duration,
	modelScaler ModelScaler,
	modelResolver ModelResolver,
	httpClient *http.Client,
) (*Messenger, error)

func (*Messenger) Start

func (m *Messenger) Start(ctx context.Context) error

func (*Messenger) Stop

func (m *Messenger) Stop(ctx context.Context) error

type ModelResolver

type ModelResolver interface {
	AwaitBestAddress(ctx context.Context, model string) (string, func(), error)
}

type ModelScaler

type ModelScaler interface {
	ModelExists(ctx context.Context, model string) (bool, error)
	ScaleAtLeastOneReplica(ctx context.Context, model string) error
}

Jump to

Keyboard shortcuts

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