Documentation ¶
Index ¶
- Variables
- func CacheExpires(r *http.Response) time.Time
- type APIClient
- type APIKey
- type APIResponse
- type AgentClustersApiService
- func (a *AgentClustersApiService) GetKafkaAgent(ctx _context.Context, id string) (DataplaneClusterAgentConfig, *_nethttp.Response, error)
- func (a *AgentClustersApiService) GetKafkas(ctx _context.Context, id string) (ManagedKafkaList, *_nethttp.Response, error)
- func (a *AgentClustersApiService) UpdateAgentClusterStatus(ctx _context.Context, id string, ...) (*_nethttp.Response, error)
- func (a *AgentClustersApiService) UpdateKafkaClusterStatus(ctx _context.Context, id string, requestBody map[string]DataPlaneKafkaStatus) (*_nethttp.Response, error)
- type BasicAuth
- type Configuration
- type DataPlaneClusterUpdateStatusRequest
- type DataPlaneClusterUpdateStatusRequestCapacity
- type DataPlaneClusterUpdateStatusRequestConditions
- type DataPlaneClusterUpdateStatusRequestStrimzi
- type DataPlaneKafkaStatus
- type DataPlaneKafkaStatusCapacity
- type DataPlaneKafkaStatusRoutes
- type DataPlaneKafkaStatusVersions
- type DataplaneClusterAgentConfig
- type DataplaneClusterAgentConfigSpec
- type DataplaneClusterAgentConfigSpecCapacity
- type DataplaneClusterAgentConfigSpecNet
- type DataplaneClusterAgentConfigSpecObservability
- type Error
- type GenericOpenAPIError
- type ListReference
- type ManagedKafka
- type ManagedKafkaAllOfMetadata
- type ManagedKafkaAllOfMetadataAnnotations
- type ManagedKafkaAllOfMetadataLabels
- type ManagedKafkaAllOfSpec
- type ManagedKafkaAllOfSpecEndpoint
- type ManagedKafkaAllOfSpecEndpointTls
- type ManagedKafkaAllOfSpecOauth
- type ManagedKafkaAllOfSpecServiceAccounts
- type ManagedKafkaCapacity
- type ManagedKafkaList
- type ManagedKafkaVersions
- type ObservatoriumProxyApiService
- type PrivateObjectReference
- type ServerConfiguration
- type ServerVariable
- type WatchEvent
Constants ¶
This section is empty.
Variables ¶
var ( // ContextOAuth2 takes an oauth2.TokenSource as authentication for the request. ContextOAuth2 = contextKey("token") // ContextBasicAuth takes BasicAuth as authentication for the request. ContextBasicAuth = contextKey("basic") // ContextAccessToken takes a string oauth2 access token as authentication for the request. ContextAccessToken = contextKey("accesstoken") // ContextAPIKey takes an APIKey as authentication for the request ContextAPIKey = contextKey("apikey") )
Functions ¶
Types ¶
type APIClient ¶
type APIClient struct { AgentClustersApi *AgentClustersApiService ObservatoriumProxyApi *ObservatoriumProxyApiService // contains filtered or unexported fields }
APIClient manages communication with the Kafka Service Fleet Manager API v1.8.0 In most cases there should be only one, shared, APIClient.
func NewAPIClient ¶
func NewAPIClient(cfg *Configuration) *APIClient
NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.
func (*APIClient) ChangeBasePath ¶
ChangeBasePath changes base path to allow switching to mocks
func (*APIClient) GetConfig ¶
func (c *APIClient) GetConfig() *Configuration
Allow modification of underlying config for alternate implementations and testing Caution: modifying the configuration while live can cause data races and potentially unwanted behavior
type APIKey ¶
APIKey provides API key based authentication to a request passed via context using ContextAPIKey
type APIResponse ¶
type APIResponse struct { *http.Response `json:"-"` Message string `json:"message,omitempty"` // Operation is the name of the OpenAPI operation. Operation string `json:"operation,omitempty"` // RequestURL is the request URL. This value is always available, even if the // embedded *http.Response is nil. RequestURL string `json:"url,omitempty"` // Method is the HTTP method used for the request. This value is always // available, even if the embedded *http.Response is nil. Method string `json:"method,omitempty"` // Payload holds the contents of the response body (which may be nil or empty). // This is provided here as the raw response.Body() reader will have already // been drained. Payload []byte `json:"-"` }
APIResponse stores the API response returned by the server.
func NewAPIResponse ¶
func NewAPIResponse(r *http.Response) *APIResponse
NewAPIResponse returns a new APIResonse object.
func NewAPIResponseWithError ¶
func NewAPIResponseWithError(errorMessage string) *APIResponse
NewAPIResponseWithError returns a new APIResponse object with the provided error message.
type AgentClustersApiService ¶
type AgentClustersApiService service
AgentClustersApiService AgentClustersApi service
func (*AgentClustersApiService) GetKafkaAgent ¶
func (a *AgentClustersApiService) GetKafkaAgent(ctx _context.Context, id string) (DataplaneClusterAgentConfig, *_nethttp.Response, error)
GetKafkaAgent Get the spec of the ManagedKafkaAgent CR spec
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param id The ID of record
@return DataplaneClusterAgentConfig
func (*AgentClustersApiService) GetKafkas ¶
func (a *AgentClustersApiService) GetKafkas(ctx _context.Context, id string) (ManagedKafkaList, *_nethttp.Response, error)
GetKafkas Get the list of ManagedaKafkas for the specified agent cluster
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param id The ID of record
@return ManagedKafkaList
func (*AgentClustersApiService) UpdateAgentClusterStatus ¶
func (a *AgentClustersApiService) UpdateAgentClusterStatus(ctx _context.Context, id string, dataPlaneClusterUpdateStatusRequest DataPlaneClusterUpdateStatusRequest) (*_nethttp.Response, error)
UpdateAgentClusterStatus Update the status of an agent cluster
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param id The ID of record
- @param dataPlaneClusterUpdateStatusRequest Cluster status update data
func (*AgentClustersApiService) UpdateKafkaClusterStatus ¶
func (a *AgentClustersApiService) UpdateKafkaClusterStatus(ctx _context.Context, id string, requestBody map[string]DataPlaneKafkaStatus) (*_nethttp.Response, error)
UpdateKafkaClusterStatus Update the status of Kafka clusters on an agent cluster
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param id The ID of record
- @param requestBody Kafka clusters status update data
type BasicAuth ¶
type BasicAuth struct { UserName string `json:"userName,omitempty"` Password string `json:"password,omitempty"` }
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
type Configuration ¶
type Configuration struct { BasePath string `json:"basePath,omitempty"` Host string `json:"host,omitempty"` Scheme string `json:"scheme,omitempty"` DefaultHeader map[string]string `json:"defaultHeader,omitempty"` UserAgent string `json:"userAgent,omitempty"` Debug bool `json:"debug,omitempty"` Servers []ServerConfiguration HTTPClient *http.Client }
Configuration stores the configuration of the API client
func NewConfiguration ¶
func NewConfiguration() *Configuration
NewConfiguration returns a new Configuration object
func (*Configuration) AddDefaultHeader ¶
func (c *Configuration) AddDefaultHeader(key string, value string)
AddDefaultHeader adds a new HTTP header to the default header in the request
type DataPlaneClusterUpdateStatusRequest ¶
type DataPlaneClusterUpdateStatusRequest struct { // A map of supported instance type to reported capacity information Capacity map[string]DataPlaneClusterUpdateStatusRequestCapacity `json:"capacity,omitempty"` // The cluster data plane conditions Conditions []DataPlaneClusterUpdateStatusRequestConditions `json:"conditions,omitempty"` Strimzi []DataPlaneClusterUpdateStatusRequestStrimzi `json:"strimzi,omitempty"` }
DataPlaneClusterUpdateStatusRequest Schema for the request to update a data plane cluster's status
type DataPlaneClusterUpdateStatusRequestCapacity ¶
type DataPlaneClusterUpdateStatusRequestCapacity struct { // The maximum number of units that can be placed onto the instance type machine pool MaxUnits int32 `json:"maxUnits,omitempty"` // the remaining units that can be placed onto the instance type machine pool RemainingUnits int32 `json:"remainingUnits,omitempty"` }
DataPlaneClusterUpdateStatusRequestCapacity The reported capacity object
type DataPlaneClusterUpdateStatusRequestConditions ¶
type DataPlaneClusterUpdateStatusRequestConditions struct { Type string `json:"type,omitempty"` Reason string `json:"reason,omitempty"` Message string `json:"message,omitempty"` Status string `json:"status,omitempty"` }
DataPlaneClusterUpdateStatusRequestConditions struct for DataPlaneClusterUpdateStatusRequestConditions
type DataPlaneClusterUpdateStatusRequestStrimzi ¶
type DataPlaneClusterUpdateStatusRequestStrimzi struct { Ready bool `json:"ready"` Version string `json:"version"` KafkaVersions []string `json:"kafkaVersions,omitempty"` KafkaIbpVersions []string `json:"kafkaIbpVersions,omitempty"` }
DataPlaneClusterUpdateStatusRequestStrimzi struct for DataPlaneClusterUpdateStatusRequestStrimzi
type DataPlaneKafkaStatus ¶
type DataPlaneKafkaStatus struct { // The status conditions of a Kafka cluster Conditions []DataPlaneClusterUpdateStatusRequestConditions `json:"conditions,omitempty"` Capacity DataPlaneKafkaStatusCapacity `json:"capacity,omitempty"` Versions DataPlaneKafkaStatusVersions `json:"versions,omitempty"` // Routes created for a Kafka cluster Routes *[]DataPlaneKafkaStatusRoutes `json:"routes,omitempty"` AdminServerURI string `json:"adminServerURI,omitempty"` }
DataPlaneKafkaStatus Schema of the status object for a Kafka cluster
type DataPlaneKafkaStatusCapacity ¶
type DataPlaneKafkaStatusCapacity struct { IngressEgressThroughputPerSec *string `json:"ingressEgressThroughputPerSec,omitempty"` TotalMaxConnections *int32 `json:"totalMaxConnections,omitempty"` MaxDataRetentionSize *string `json:"maxDataRetentionSize,omitempty"` MaxPartitions *int32 `json:"maxPartitions,omitempty"` MaxDataRetentionPeriod *string `json:"maxDataRetentionPeriod,omitempty"` MaxConnectionAttemptsPerSec *int32 `json:"maxConnectionAttemptsPerSec,omitempty"` }
DataPlaneKafkaStatusCapacity Capacity information of the data plane cluster
type DataPlaneKafkaStatusRoutes ¶
type DataPlaneKafkaStatusRoutes struct { Name string `json:"name,omitempty"` Prefix string `json:"prefix,omitempty"` Router string `json:"router,omitempty"` }
DataPlaneKafkaStatusRoutes struct for DataPlaneKafkaStatusRoutes
type DataPlaneKafkaStatusVersions ¶
type DataPlaneKafkaStatusVersions struct { Kafka string `json:"kafka,omitempty"` Strimzi string `json:"strimzi,omitempty"` KafkaIbp string `json:"kafkaIbp,omitempty"` }
DataPlaneKafkaStatusVersions Version information related to a Kafka cluster
type DataplaneClusterAgentConfig ¶
type DataplaneClusterAgentConfig struct {
Spec DataplaneClusterAgentConfigSpec `json:"spec,omitempty"`
}
DataplaneClusterAgentConfig Configuration for the data plane cluster agent
type DataplaneClusterAgentConfigSpec ¶
type DataplaneClusterAgentConfigSpec struct { Net DataplaneClusterAgentConfigSpecNet `json:"net,omitempty"` // A map of supported instance type to configured nodes size Capacity map[string]DataplaneClusterAgentConfigSpecCapacity `json:"capacity,omitempty"` Observability DataplaneClusterAgentConfigSpecObservability `json:"observability,omitempty"` }
DataplaneClusterAgentConfigSpec Data plane cluster agent spec
type DataplaneClusterAgentConfigSpecCapacity ¶
type DataplaneClusterAgentConfigSpecCapacity struct { // The maximum number of nodes configured for the instance type MaxNodes int32 `json:"maxNodes,omitempty"` }
DataplaneClusterAgentConfigSpecCapacity The reported capacity object
type DataplaneClusterAgentConfigSpecNet ¶
type DataplaneClusterAgentConfigSpecNet struct { // Indicates whether the network configuration is private or not Private bool `json:"private"` }
DataplaneClusterAgentConfigSpecNet Indicates data plane cluster network configuration
type DataplaneClusterAgentConfigSpecObservability ¶
type DataplaneClusterAgentConfigSpecObservability struct { AccessToken *string `json:"accessToken,omitempty"` Channel string `json:"channel,omitempty"` Repository string `json:"repository,omitempty"` Tag string `json:"tag,omitempty"` }
DataplaneClusterAgentConfigSpecObservability Observability configurations
type Error ¶
type Error struct { // Human-readable description of the error. Intended for human consumption Reason string `json:"reason"` // Relatively unique operation ID of the request associated to the error OperationId string `json:"operation_id,omitempty"` // The unique and immutable identifier of the resource Id string `json:"id"` // The kind of the resource Kind string `json:"kind"` // The absolute path of the resource Href string `json:"href"` // Code of the error Code string `json:"code"` }
Error struct for Error
type GenericOpenAPIError ¶
type GenericOpenAPIError struct {
// contains filtered or unexported fields
}
GenericOpenAPIError Provides access to the body, error and model on returned errors.
func (GenericOpenAPIError) Body ¶
func (e GenericOpenAPIError) Body() []byte
Body returns the raw bytes of the response
func (GenericOpenAPIError) Error ¶
func (e GenericOpenAPIError) Error() string
Error returns non-empty string if there was an error.
func (GenericOpenAPIError) Model ¶
func (e GenericOpenAPIError) Model() interface{}
Model returns the unpacked model of the error
type ListReference ¶
type ListReference struct {
Kind string `json:"kind"`
}
ListReference struct for ListReference
type ManagedKafka ¶
type ManagedKafka struct { Id string `json:"id,omitempty"` Kind string `json:"kind,omitempty"` Metadata ManagedKafkaAllOfMetadata `json:"metadata,omitempty"` Spec ManagedKafkaAllOfSpec `json:"spec,omitempty"` }
ManagedKafka struct for ManagedKafka
type ManagedKafkaAllOfMetadata ¶
type ManagedKafkaAllOfMetadata struct { Name string `json:"name,omitempty"` Namespace string `json:"namespace,omitempty"` Annotations ManagedKafkaAllOfMetadataAnnotations `json:"annotations,omitempty"` Labels ManagedKafkaAllOfMetadataLabels `json:"labels,omitempty"` }
ManagedKafkaAllOfMetadata struct for ManagedKafkaAllOfMetadata
type ManagedKafkaAllOfMetadataAnnotations ¶
type ManagedKafkaAllOfMetadataAnnotations struct { Bf2OrgId string `json:"bf2.org/id"` Bf2OrgPlacementId string `json:"bf2.org/placementId"` ManagedkafkaBf2OrgPauseReconciliation string `json:"managedkafka.bf2.org/pause-reconciliation,omitempty"` }
ManagedKafkaAllOfMetadataAnnotations struct for ManagedKafkaAllOfMetadataAnnotations
type ManagedKafkaAllOfMetadataLabels ¶
type ManagedKafkaAllOfMetadataLabels struct { Bf2OrgKafkaInstanceProfileType string `json:"bf2.org/kafkaInstanceProfileType,omitempty"` Bf2OrgKafkaInstanceProfileQuotaConsumed string `json:"bf2.org/kafkaInstanceProfileQuotaConsumed"` Bf2OrgDeployment string `json:"bf2.org/deployment,omitempty"` Bf2OrgSuspended string `json:"bf2.org/suspended,omitempty"` }
ManagedKafkaAllOfMetadataLabels struct for ManagedKafkaAllOfMetadataLabels
type ManagedKafkaAllOfSpec ¶
type ManagedKafkaAllOfSpec struct { ServiceAccounts []ManagedKafkaAllOfSpecServiceAccounts `json:"serviceAccounts,omitempty"` Capacity ManagedKafkaCapacity `json:"capacity,omitempty"` Oauth ManagedKafkaAllOfSpecOauth `json:"oauth,omitempty"` Owners []string `json:"owners,omitempty"` Endpoint ManagedKafkaAllOfSpecEndpoint `json:"endpoint,omitempty"` Versions ManagedKafkaVersions `json:"versions,omitempty"` Deleted bool `json:"deleted"` }
ManagedKafkaAllOfSpec struct for ManagedKafkaAllOfSpec
type ManagedKafkaAllOfSpecEndpoint ¶
type ManagedKafkaAllOfSpecEndpoint struct { BootstrapServerHost string `json:"bootstrapServerHost,omitempty"` Tls *ManagedKafkaAllOfSpecEndpointTls `json:"tls,omitempty"` }
ManagedKafkaAllOfSpecEndpoint struct for ManagedKafkaAllOfSpecEndpoint
type ManagedKafkaAllOfSpecEndpointTls ¶
type ManagedKafkaAllOfSpecEndpointTls struct { Cert string `json:"cert,omitempty"` Key string `json:"key,omitempty"` }
ManagedKafkaAllOfSpecEndpointTls struct for ManagedKafkaAllOfSpecEndpointTls
type ManagedKafkaAllOfSpecOauth ¶
type ManagedKafkaAllOfSpecOauth struct { TokenEndpointURI string `json:"tokenEndpointURI,omitempty"` JwksEndpointURI string `json:"jwksEndpointURI,omitempty"` ValidIssuerEndpointURI string `json:"validIssuerEndpointURI,omitempty"` UserNameClaim string `json:"userNameClaim,omitempty"` FallbackUserNameClaim string `json:"fallbackUserNameClaim,omitempty"` TlsTrustedCertificate *string `json:"tlsTrustedCertificate,omitempty"` CustomClaimCheck string `json:"customClaimCheck,omitempty"` MaximumSessionLifetime int64 `json:"maximumSessionLifetime"` }
ManagedKafkaAllOfSpecOauth struct for ManagedKafkaAllOfSpecOauth
type ManagedKafkaAllOfSpecServiceAccounts ¶
type ManagedKafkaAllOfSpecServiceAccounts struct { Name string `json:"name"` Principal string `json:"principal"` Password string `json:"password"` }
ManagedKafkaAllOfSpecServiceAccounts struct for ManagedKafkaAllOfSpecServiceAccounts
type ManagedKafkaCapacity ¶
type ManagedKafkaCapacity struct { IngressPerSec string `json:"ingressPerSec,omitempty"` EgressPerSec string `json:"egressPerSec,omitempty"` TotalMaxConnections int32 `json:"totalMaxConnections,omitempty"` MaxDataRetentionSize string `json:"maxDataRetentionSize,omitempty"` MaxPartitions int32 `json:"maxPartitions,omitempty"` MaxDataRetentionPeriod string `json:"maxDataRetentionPeriod,omitempty"` MaxConnectionAttemptsPerSec int32 `json:"maxConnectionAttemptsPerSec,omitempty"` }
ManagedKafkaCapacity struct for ManagedKafkaCapacity
type ManagedKafkaList ¶
type ManagedKafkaList struct { Kind string `json:"kind"` Items []ManagedKafka `json:"items"` }
ManagedKafkaList A list of ManagedKafka
type ManagedKafkaVersions ¶
type ManagedKafkaVersions struct { Kafka string `json:"kafka,omitempty"` KafkaIbp string `json:"kafkaIbp,omitempty"` Strimzi string `json:"strimzi,omitempty"` }
ManagedKafkaVersions struct for ManagedKafkaVersions
type ObservatoriumProxyApiService ¶
type ObservatoriumProxyApiService service
ObservatoriumProxyApiService ObservatoriumProxyApi service
func (*ObservatoriumProxyApiService) VerifyObservatoriumProxyRequestValid ¶
func (a *ObservatoriumProxyApiService) VerifyObservatoriumProxyRequestValid(ctx _context.Context, clusterExternalId string) (*_nethttp.Response, error)
VerifyObservatoriumProxyRequestValid Method for VerifyObservatoriumProxyRequestValid this endpoint is used to check whether a token sent from a data plane cluster matches the data plane cluster details obtained from the clusters table that correspond to the \"cluster_external_id\" value sent in the url path. If there is a match, the 200 response is sent, which indicates that the token can be used to send metrics for the corresponding data plane cluster via the observatorium proxy
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param clusterExternalId external cluster ID of a data plane cluster. It has to match the service account details stored in clusters table for that cluster
type PrivateObjectReference ¶
type PrivateObjectReference struct { Id string `json:"id,omitempty"` Kind string `json:"kind,omitempty"` }
PrivateObjectReference struct for PrivateObjectReference
type ServerConfiguration ¶
type ServerConfiguration struct { Url string Description string Variables map[string]ServerVariable }
ServerConfiguration stores the information about a server
type ServerVariable ¶
ServerVariable stores the information about a server variable
type WatchEvent ¶
type WatchEvent struct { Type string `json:"type"` Error Error `json:"error,omitempty"` Object *map[string]interface{} `json:"object,omitempty"` }
WatchEvent struct for WatchEvent
Source Files ¶
- api_agent_clusters.go
- api_observatorium_proxy.go
- client.go
- configuration.go
- model_data_plane_cluster_update_status_request.go
- model_data_plane_cluster_update_status_request_capacity.go
- model_data_plane_cluster_update_status_request_conditions.go
- model_data_plane_cluster_update_status_request_strimzi.go
- model_data_plane_kafka_status.go
- model_data_plane_kafka_status_capacity.go
- model_data_plane_kafka_status_routes.go
- model_data_plane_kafka_status_versions.go
- model_dataplane_cluster_agent_config.go
- model_dataplane_cluster_agent_config_spec.go
- model_dataplane_cluster_agent_config_spec_capacity.go
- model_dataplane_cluster_agent_config_spec_net.go
- model_dataplane_cluster_agent_config_spec_observability.go
- model_error.go
- model_list_reference.go
- model_managed_kafka.go
- model_managed_kafka_all_of_metadata.go
- model_managed_kafka_all_of_metadata_annotations.go
- model_managed_kafka_all_of_metadata_labels.go
- model_managed_kafka_all_of_spec.go
- model_managed_kafka_all_of_spec_endpoint.go
- model_managed_kafka_all_of_spec_endpoint_tls.go
- model_managed_kafka_all_of_spec_oauth.go
- model_managed_kafka_all_of_spec_service_accounts.go
- model_managed_kafka_capacity.go
- model_managed_kafka_list.go
- model_managed_kafka_versions.go
- model_private_object_reference.go
- model_watch_event.go
- response.go