server

package
v1.15.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminServer added in v0.10.0

type AdminServer struct {
	v1.UnimplementedAPIUsageServiceServer
	// contains filtered or unexported fields
}

AdminServer is the server for the api-usage service.

func NewAdmin added in v0.10.0

func NewAdmin(store *pkgstore.Store, logger logr.Logger) *AdminServer

NewAdmin creates a new admin server.

func (*AdminServer) GetAggregatedSummary added in v0.10.0

func (s *AdminServer) GetAggregatedSummary(ctx context.Context, req *v1.GetAggregatedSummaryRequest) (*v1.AggregatedSummary, error)

GetAggregatedSummary aggregates the API usage in the specified time range.

func (*AdminServer) Run added in v0.10.0

func (s *AdminServer) Run(ctx context.Context, port int) error

Run starts the admin server.

type InternalServer added in v0.10.0

type InternalServer struct {
	v1.UnimplementedCollectionInternalServiceServer
	// contains filtered or unexported fields
}

InternalServer is the server for the collection service.

func NewInternal added in v0.10.0

func NewInternal(store *store.Store, logger logr.Logger) *InternalServer

NewInternal creates a new internal server.

func (*InternalServer) CreateUsage added in v0.10.0

func (s *InternalServer) CreateUsage(ctx context.Context, req *v1.CreateUsageRequest) (*v1.Usage, error)

CreateUsage creates usage.

func (*InternalServer) Run added in v0.10.0

func (s *InternalServer) Run(ctx context.Context, port int) error

Run starts the internal gRPC server.

type Server

type Server struct {
	v1.UnimplementedAPIUsageServiceServer
	// contains filtered or unexported fields
}

Server is the server for the api-usage service.

func New

func New(store *pkgstore.Store, cache cacheGetter, logger logr.Logger) *Server

New creates a new server.

func (*Server) ListModelUsageSummaries added in v1.12.0

ListModelUsageSummaries lists model usage summaries.

func (*Server) ListUsageData added in v1.3.0

func (s *Server) ListUsageData(ctx context.Context, req *v1.ListUsageDataRequest) (*v1.ListUsageDataResponse, error)

ListUsageData list the usages by groups.

func (*Server) Run

func (s *Server) Run(ctx context.Context, port int, authConfig config.AuthConfig) error

Run starts the server.

func (*Server) Stop added in v1.3.0

func (s *Server) Stop()

Stop stops the gRPC server.

Jump to

Keyboard shortcuts

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