metadata

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2025 License: Apache-2.0 Imports: 12 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.

README

kubectl apply -f docs/development/app/metadata.yaml
kubectl -n aibrix-system port-forward svc/aibrix-metadata-service 8090:8090 &

Create user

curl http://localhost:8090/CreateUser \
  -H "Content-Type: application/json" \
  -d '{"name": "your-user-name","rpm": 100,"tpm": 1000}'

Read user

curl http://localhost:8090/ReadUser \
  -H "Content-Type: application/json" \
  -d '{"name": "your-user-name"}'

Update user

curl http://localhost:8090/UpdateUser \
  -H "Content-Type: application/json" \
  -d '{"name": "your-user-name","rpm": 1000,"tpm": 10000}'

Delete user

curl http://localhost:8090/DeleteUser \
  -H "Content-Type: application/json" \
  -d '{"name": "your-user-name"}'

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHTTPServer

func NewHTTPServer(addr string, redis *redis.Client) *http.Server

Types

type ModelInfo

type ModelInfo struct {
	ID      string `json:"id"`
	Created int64  `json:"created"`
	Object  string `json:"object"`
	OwnedBy string `json:"owned_by"`
}

ModelInfo represents the information about a single model

type ModelListResponse

type ModelListResponse struct {
	Object string      `json:"object"`
	Data   []ModelInfo `json:"data"`
}

ModelListResponse represents the overall response structure

func BuildModelsResponse

func BuildModelsResponse(modelNames []string) ModelListResponse

BuildModelsResponse converts a list of model names to the target response type

Jump to

Keyboard shortcuts

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