Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHandler ¶
Types ¶
type CountCallService ¶
type CountCallService interface {
CountCall(context.Context, app.CountCallInput) (app.CountResult, error)
}
CountCallService is the concrete app CountCall seam (*tokenaccounting/app.Service).
type CountRequest ¶
type CountResponse ¶
type CountResponse struct {
Planes []PlaneCount `json:"planes"`
}
type PlaneCount ¶
type PlaneCount struct {
Plane lipapi.UsagePlane `json:"plane"`
Tokens TokenDimensions `json:"tokens"`
Source lipapi.UsageSource `json:"source"`
Authority lipapi.UsageAuthority `json:"authority"`
Tokenizer lipapi.TokenizerRef `json:"tokenizer"`
FallbackReason app.FallbackReason `json:"fallback_reason,omitempty"`
}
type Service ¶
type Service interface {
Count(context.Context, CountRequest) (CountResponse, error)
}
Service is the narrow application seam used by the admin HTTP adapter.
func AdaptCountCallService ¶
func AdaptCountCallService(svc CountCallService) Service
AdaptCountCallService projects CountCall onto Service. Typed-nil *app.Service → nil.
Click to show internal directories.
Click to hide internal directories.