Documentation
¶
Index ¶
- func Delete(client *golangsdk.ServiceClient, meshId string) error
- type CreateOpts
- type ExtendParamsResponse
- type FieldSelector
- type InjectionConfig
- type InstallationConfig
- type ListMeshResponse
- type MeshCluster
- type MeshClusterResponse
- type MeshConfig
- type MeshConfigResponse
- type MeshExtendParams
- type MeshMetadata
- type MeshMetadataResponse
- type MeshSpec
- type MeshSpecResponse
- type MeshStatus
- type ProxyConfig
- type ProxyConfigResponse
- type Selector
- type ServiceMesh
- type TelemetryConfig
- type TelemetryConfigResponse
- type Tracing
- type TracingExtensionProvider
- type TracingExtensionProviderResponse
- type TracingResponse
- type ZipkinTracingProvider
- type ZipkinTracingProviderResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CreateOpts ¶
type CreateOpts struct {
// API version. The value is fixed at v1 and cannot be changed.
APIVersion string `json:"apiVersion" required:"true"`
// API type. The value is fixed at Mesh or mesh and cannot be changed.
Kind string `json:"kind" required:"true"`
// Basic information about the service mesh. Metadata is a collection of attributes.
Metadata MeshMetadata `json:"metadata" required:"true"`
// Detailed description of the service mesh. ASM creates or updates the service mesh by spec.
Spec MeshSpec `json:"spec" required:"true"`
}
type ExtendParamsResponse ¶
type ExtendParamsResponse struct {
// Information about clusters in the mesh.
Clusters []MeshClusterResponse `json:"clusters"`
}
type FieldSelector ¶
type InjectionConfig ¶
type InjectionConfig struct {
// Namespaces where sidecars to be injected.
Namespaces *Selector `json:"namespaces,omitempty"`
}
type InstallationConfig ¶
type InstallationConfig struct {
// Nodes where service mesh components are installed.
Nodes *Selector `json:"nodes" required:"true"`
}
type ListMeshResponse ¶
type ListMeshResponse struct {
// API version. The value is fixed at v1 and cannot be changed.
ApiVersion string `json:"apiVersion"`
// API type. The value is fixed at MeshList and cannot be changed.
Kind string `json:"kind"`
// Service Mesh List
Items []ServiceMesh `json:"items"`
}
type MeshCluster ¶
type MeshCluster struct {
// Cluster ID, which is unique and can be used to query the cluster to be added.
ClusterID string `json:"clusterID" required:"true"`
// Sidecar injection configuration.
Injection *InjectionConfig `json:"injection,omitempty"`
// Installation configuration of service mesh components.
Installation *InstallationConfig `json:"installation" required:"true"`
}
type MeshClusterResponse ¶
type MeshClusterResponse struct {
// Cluster ID. Unique and used to query the cluster.
ClusterID string `json:"clusterID"`
}
type MeshConfig ¶
type MeshConfig struct {
// Data plane configuration of the service mesh.
ProxyConfig *ProxyConfig `json:"proxyConfig,omitempty"`
// Observability configuration of the service mesh.
TelemetryConfig *TelemetryConfig `json:"telemetryConfig,omitempty"`
}
type MeshConfigResponse ¶
type MeshConfigResponse struct {
// Data plane configuration of the service mesh.
ProxyConfig ProxyConfigResponse `json:"proxyConfig"`
// Observability configuration of the service mesh.
TelemetryConfig TelemetryConfigResponse `json:"telemetryConfig"`
}
type MeshExtendParams ¶
type MeshExtendParams struct {
// Cluster information in the service mesh.
Clusters []MeshCluster `json:"clusters" required:"true"`
}
type MeshMetadata ¶
type MeshMetadata struct {
// Service mesh name.
// Enter 4 to 64 characters. The name must start with a lowercase letter and not end with a hyphen (-).
// Only lowercase letters, digits, and hyphens (-) are allowed.
Name string `json:"name" required:"true"`
}
type MeshMetadataResponse ¶
type MeshMetadataResponse struct {
// Service mesh name. Format: 1–63 characters,
// lowercase letters, digits, hyphens, must start with lowercase and end with letter/digit.
Name string `json:"name"`
// Service mesh ID, which is unique and automatically generated after the service mesh is created. A custom value will not take effect.
UID string `json:"uid"`
// Time when the service mesh was created.
CreationTimestamp string `json:"creationTimestamp"`
}
type MeshSpec ¶
type MeshSpec struct {
// Service mesh type.
// InCluster: service mesh with an in-cluster control plane.
// The value is InCluster for the service mesh of the Basic edition.
Type string `json:"type" required:"true"`
// Service mesh version.
Version string `json:"version" required:"true"`
// Extensions of the service mesh.
ExtendParams *MeshExtendParams `json:"extendParams" required:"true"`
// Whether the service mesh supports IPv6.
IPv6Enable bool `json:"ipv6Enable,omitempty"`
// Service mesh configuration.
Config *MeshConfig `json:"config,omitempty"`
}
type MeshSpecResponse ¶
type MeshSpecResponse struct {
// Service mesh type. Only "Base edition" supported.
Type string `json:"type"`
// Service mesh version.
Version string `json:"version"`
// Extensions of the service mesh.
ExtendParams ExtendParamsResponse `json:"extendParams"`
// Whether the mesh supports IPv6.
IPv6Enable bool `json:"ipv6Enable"`
// Service mesh configuration.
Config MeshConfigResponse `json:"config"`
}
type MeshStatus ¶
type MeshStatus struct {
// Service mesh status. The options are as follows:
// Running: The service mesh is running.
// Creating: The service mesh is being created.
// CreateFailed: The service mesh fails to be created.
// Deleting: The service mesh is being deleted.
// DeleteFailed: The service mesh fails to be deleted.
// Upgrading: The service mesh is being upgraded.
// UpgradeFailed: The service mesh fails to be upgraded.
// RollingBack: The service mesh is being rolled back.
// RollbackFailed: The service mesh fails to be rolled back.
Phase string `json:"phase"`
// Time when the mesh was last updated.
UpdateTimestamp string `json:"updateTimestamp"`
}
MeshStatus (Table 29)
type ProxyConfig ¶
type ProxyConfig struct {
// IP address ranges that will be included for outbound traffic redirection. Use commas (,) to separate the IP address ranges.
IncludeIPRanges string `json:"includeIPRanges,omitempty"`
// IP address ranges that will be excluded for outbound traffic redirection. Use commas (,) to separate the IP address ranges.
ExcludeIPRanges string `json:"excludeIPRanges,omitempty"`
// Ports that will be excluded for outbound traffic redirection. Use commas (,) to separate the ports.
ExcludeOutboundPorts string `json:"excludeOutboundPorts,omitempty"`
// Ports that will be excluded for inbound traffic redirection. Use commas (,) to separate the ports.
ExcludeInboundPorts string `json:"excludeInboundPorts,omitempty"`
// Ports that will be included for outbound traffic redirection. Use commas (,) to separate the ports.
IncludeOutboundPorts string `json:"includeOutboundPorts,omitempty"`
// Ports that will be included for inbound traffic redirection. Use commas (,) to separate the ports.
IncludeInboundPorts string `json:"includeInboundPorts,omitempty"`
}
type ProxyConfigResponse ¶
type ProxyConfigResponse struct {
// IP address ranges that will be included in outbound traffic interception.
IncludeIPRanges string `json:"includeIPRanges"`
// IP address ranges that will be excluded from outbound traffic interception.
ExcludeIPRanges string `json:"excludeIPRanges"`
// Ports that will be excluded from outbound traffic redirection.
ExcludeOutboundPorts string `json:"excludeOutboundPorts"`
// Ports that will be excluded for inbound traffic interception.
ExcludeInboundPorts string `json:"excludeInboundPorts"`
// Ports that will be included for outbound traffic interception.
IncludeOutboundPorts string `json:"includeOutboundPorts"`
// Ports that will be included for inbound traffic interception.
IncludeInboundPorts string `json:"includeInboundPorts"`
}
type Selector ¶
type Selector struct {
// Field selector.
FieldSelector *FieldSelector `json:"fieldSelector" required:"true"`
}
type ServiceMesh ¶
type ServiceMesh struct {
// API version. The value is fixed at v1 and cannot be changed.
APIVersion string `json:"apiVersion"`
// API type. The value is fixed at Mesh or mesh and cannot be changed.
Kind string `json:"kind"`
// Basic information about the service mesh.
Metadata MeshMetadataResponse `json:"metadata"`
// Detailed description of the service mesh / ASM instance.
Spec MeshSpecResponse `json:"spec"`
// Service mesh ID. Value is automatically generated by ASM.
Status MeshStatus `json:"status"`
}
func Create ¶
func Create(client *golangsdk.ServiceClient, opts CreateOpts) (*ServiceMesh, error)
This function is used to create a service mesh.
func Get ¶
func Get(client *golangsdk.ServiceClient, meshId string) (*ServiceMesh, error)
This function is used to obtain details about a service mesh.
func List ¶
func List(client *golangsdk.ServiceClient) ([]ServiceMesh, error)
This function is used to obtain details about all service meshes.
type TelemetryConfig ¶
type TelemetryConfig struct {
// Tracing configuration, which is used to report traces in the service mesh.
Tracing *Tracing `json:"tracing,omitempty"`
}
type TelemetryConfigResponse ¶
type TelemetryConfigResponse struct {
// Tracing configuration for reporting trace in service mesh.
Tracing TracingResponse `json:"tracing"`
}
type Tracing ¶
type Tracing struct {
// Tracing sampling rate.
RandomSamplingPercentage float64 `json:"randomSamplingPercentage,omitempty"`
// Name of the default provider that tracing reports data to, which must match the name field in extensionProviders or use the preset provider apm-otel of ASM.
// If apm-otel is used, ensure that APM 2.0 is supported in the current region and the service mesh version is later than 1.18.
DefaultProviders []string `json:"defaultProviders,omitempty"`
// User-defined provider. Currently, Zipkin is supported.
// If you configure the Zipkin provider, ensure that the service mesh version is 1.15 or later.
ExtensionProviders []TracingExtensionProvider `json:"extensionProviders,omitempty"`
}
type TracingExtensionProvider ¶
type TracingExtensionProvider struct {
// Provider name.
Name string `json:"name,omitempty"`
// Self-defined configuration of Zipkin.
Zipkin ZipkinTracingProvider `json:"zipkin,omitempty"`
}
type TracingExtensionProviderResponse ¶
type TracingExtensionProviderResponse struct {
// Provider name.
Name string `json:"name"`
// Self-defined Zipkin configuration.
Zipkin ZipkinTracingProviderResponse `json:"zipkin"`
}
type TracingResponse ¶
type TracingResponse struct {
// Tracing sampling rate.
RandomSamplingPercentage float64 `json:"randomSamplingPercentage"`
// Default provider names to be used.
DefaultProviders []string `json:"defaultProviders"`
// List of extension providers supported (e.g., Zipkin).
ExtensionProviders []TracingExtensionProviderResponse `json:"extensionProviders"`
}
type ZipkinTracingProvider ¶
Click to show internal directories.
Click to hide internal directories.