messenger

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoadBalancer added in v0.13.0

type LoadBalancer interface {
	AwaitBestAddress(ctx context.Context, req *apiutils.Request) (string, func(), error)
}

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,
	modelClient ModelClient,
	lb LoadBalancer,
	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 ModelClient added in v0.13.0

type ModelClient interface {
	LookupModel(ctx context.Context, model, adapter string, selectors []string) (*v1.Model, 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