metadata

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

README

kubectl apply -f config/metadata/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