Documentation
¶
Index ¶
- func AddToEventQueue(data APICPEvent)
- func GetLabelQueue() *chan APICRLabelsUpdate
- func IsAPIHashQueued(dpHash string) bool
- type AIConfiguration
- type AIRL
- type API
- type APICPEvent
- type APICRLabelsUpdate
- type CORSPolicy
- type EndpointSecurity
- type EventType
- type Header
- type HeaderModifier
- type Headers
- type Operation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddToEventQueue ¶
func AddToEventQueue(data APICPEvent)
AddToEventQueue adds the api event to queue
func GetLabelQueue ¶
func GetLabelQueue() *chan APICRLabelsUpdate
GetLabelQueue adds the label change to queue
func IsAPIHashQueued ¶
IsAPIHashQueued check whether the API related to the dpHash already in the queue for the update
Types ¶
type AIConfiguration ¶
type AIConfiguration struct { LLMProviderID string `json:"llmProviderID"` LLMProviderName string `json:"llmProviderName"` LLMProviderAPIVersion string `json:"llmProviderAPIVersion"` }
AIConfiguration holds the AI configuration
type AIRL ¶
type AIRL struct { PromptTokenCount *uint32 `json:"promptTokenCount"` CompletionTokenCount *uint32 `json:"CompletionTokenCount"` TotalTokenCount *uint32 `json:"totalTokenCount"` TimeUnit string `json:"timeUnit"` RequestCount *uint32 `json:"requestCount"` }
AIRL holds AI ratelimit related data
type API ¶
type API struct { APIUUID string `json:"apiUUID"` APIName string `json:"apiName"` APIVersion string `json:"apiVersion"` IsDefaultVersion bool `json:"isDefaultVersion"` Definition string `json:"definition"` APIType string `json:"apiType"` APISubType string `json:"apiSubType"` BasePath string `json:"basePath"` Organization string `json:"organization"` SystemAPI bool `json:"systemAPI"` APIProperties map[string]string `json:"apiProperties,omitempty"` Environment string `json:"environment,omitempty"` RevisionID string `json:"revisionID"` SandEndpoint string `json:"sandEndpoint"` SandEndpointSecurity EndpointSecurity `json:"sandEndpointSecurity"` ProdEndpoint string `json:"prodEndpoint"` ProdEndpointSecurity EndpointSecurity `json:"prodEndpointSecurity"` EndpointProtocol string `json:"endpointProtocol"` CORSPolicy *CORSPolicy `json:"cORSPolicy,omitempty"` Vhost string `json:"vhost"` SandVhost string `json:"sandVhost"` SecurityScheme []string `json:"securityScheme"` AuthHeader string `json:"authHeader"` APIKeyHeader string `json:"apiKeyHeader"` Operations []Operation `json:"operations"` AIConfiguration AIConfiguration `json:"aiConfiguration"` APIHash string `json:"-"` SandAIRL *AIRL `json:"sandAIRL"` ProdAIRL *AIRL `json:"prodAIRL"` }
API holds the data that needs to be sent to agent
type APICPEvent ¶
type APICPEvent struct { Event EventType `json:"event"` API API `json:"payload"` CRName string `json:"-"` CRNamespace string `json:"-"` }
APICPEvent represents data for the control plane API.
type APICRLabelsUpdate ¶
APICRLabelsUpdate hold the label update required for a specific API CR
type CORSPolicy ¶
type CORSPolicy struct { AccessControlAllowCredentials bool `json:"accessControlAllowCredentials,omitempty"` AccessControlAllowHeaders []string `json:"accessControlAllowHeaders,omitempty"` AccessControlAllowOrigins []string `json:"accessControlAllowOrigins,omitempty"` AccessControlExposeHeaders []string `json:"accessControlExposeHeaders,omitempty"` AccessControlMaxAge *int `json:"accessControlMaxAge,omitempty"` AccessControlAllowMethods []string `json:"accessControlAllowMethods,omitempty"` }
CORSPolicy hold cors configs
type EndpointSecurity ¶
type EndpointSecurity struct { Enabled bool `json:"enabled"` SecurityType string `json:"securityType"` APIKeyName string `json:"apiKeyName"` APIKeyValue string `json:"apiKeyValue"` APIKeyIn string `json:"apiKeyIn"` BasicUsername string `json:"basicUsername"` BasicPassword string `json:"basicPassword"` }
EndpointSecurity holds the endpoint security information
type HeaderModifier ¶
type HeaderModifier struct { AddHeaders []Header `json:"addHeaders"` RemoveHeaders []string `json:"removeHeaders"` }
HeaderModifier contains header modifier values
type Headers ¶
type Headers struct { RequestHeaders HeaderModifier `json:"requestHeaders"` ResponseHeaders HeaderModifier `json:"responseHeaders"` }
Headers contains the request and response header modifier information
Click to show internal directories.
Click to hide internal directories.