client

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ModelClientMap = make(map[string][]context.CancelFunc)

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(base *url.URL, http *http.Client) *Client

func (*Client) Do

func (c *Client) Do(ctx context.Context, method, path string, reqData, respData any) error

func (*Client) Stream

func (c *Client) Stream(ctx context.Context, method, path string, data any, fn func([]byte) error) error

func (*Client) StreamResponse

func (c *Client) StreamResponse(ctx context.Context, method, path string, reqData any) (chan []byte, chan error)

type GRPCClient

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

func NewGRPCClient

func NewGRPCClient(target string) (*GRPCClient, error)

func (*GRPCClient) Close

func (c *GRPCClient) Close() error

func (*GRPCClient) ModelInfer

func (c *GRPCClient) ModelInfer(inferInputs []*grpc_client.ModelInferRequest_InferInputTensor, serviceType, modelName, modelVersion string) (*grpc_client.ModelInferResponse, error)

func (*GRPCClient) ModelMetadata

func (c *GRPCClient) ModelMetadata(modelName string, modelVersion string) (*grpc_client.ModelMetadataResponse, error)

func (*GRPCClient) ServerLive

func (c *GRPCClient) ServerLive() (*grpc_client.ServerLiveResponse, error)

func (*GRPCClient) ServerReady

func (c *GRPCClient) ServerReady() (*grpc_client.ServerReadyResponse, error)

Directories

Path Synopsis
grpc

Jump to

Keyboard shortcuts

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