Documentation
¶
Overview ¶
Package azure assembles CloudEmu's Azure-compatible HTTP server.
New takes a Drivers bundle and returns a *server.Server preloaded with the handler for each non-nil driver. Consumers that want a single service can skip this package and register the handler directly on their own server.Server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New returns a server that speaks the Azure ARM JSON wire protocol for every non-nil driver in d. Routing is path-based on
/subscriptions/{sub}/resourceGroups/{rg}/providers/{provider}/{type}/...
so handlers can register independently — virtualMachines doesn't conflict with future blob storage or networking handlers.
Types ¶
type Drivers ¶
type Drivers struct {
VirtualMachines computedriver.Compute
Disks computedriver.Compute
Snapshots computedriver.Compute
Images computedriver.Compute
SSHPublicKeys computedriver.Compute
BlobStorage storagedriver.Bucket
CosmosDB dbdriver.Database
Network netdriver.Networking
Monitor mondriver.Monitoring
Functions sdrv.Serverless
ServiceBus mqdriver.MessageQueue
SQL rdbdriver.RelationalDB
PostgresFlex rdbdriver.RelationalDB
MySQLFlex rdbdriver.RelationalDB
AKS aksserver.Backend
IAM iamdriver.IAM
// K8sAPI is the shared in-memory Kubernetes data-plane API server. It is
// shared with awsserver.Drivers.K8sAPI and gcpserver.Drivers.K8sAPI so a
// kubeconfig issued by any provider's control plane (EKS/AKS/GKE) reaches
// the same backend. Leave nil to disable Kubernetes data-plane support.
K8sAPI *kubernetes.APIServer
// ResourceDiscovery is the cross-service inventory engine. Required to
// serve Azure Resource Graph (armresourcegraph) requests. Leave nil to
// omit the handler. SubscriptionID is needed for the subscription-scoping
// check on incoming queries.
ResourceDiscovery *resourcediscovery.Engine
SubscriptionID string
}
Drivers bundles the driver interfaces the Azure server can expose. Leave a field nil to omit that service; the server returns 501 Not Implemented for any request that no registered handler matches.
VirtualMachines / Disks / Snapshots / Images all delegate to the same compute driver — the driver's Volume*/Snapshot*/Image* methods back the corresponding resources.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package aks implements the Azure Kubernetes Service (Microsoft.ContainerService) ARM REST API as a server.Handler.
|
Package aks implements the Azure Kubernetes Service (Microsoft.ContainerService) ARM REST API as a server.Handler. |
|
Package azuresql implements the Azure SQL Database (Microsoft.Sql) ARM REST API as a server.Handler.
|
Package azuresql implements the Azure SQL Database (Microsoft.Sql) ARM REST API as a server.Handler. |
|
Package blob implements the Azure Blob Storage REST+XML wire protocol as a server.Handler.
|
Package blob implements the Azure Blob Storage REST+XML wire protocol as a server.Handler. |
|
Package cosmos implements the Azure Cosmos DB SQL data-plane REST API against a CloudEmu database driver.
|
Package cosmos implements the Azure Cosmos DB SQL data-plane REST API against a CloudEmu database driver. |
|
Package disks serves Azure ARM Microsoft.Compute/disks requests against a CloudEmu compute driver's volume operations.
|
Package disks serves Azure ARM Microsoft.Compute/disks requests against a CloudEmu compute driver's volume operations. |
|
Package functions serves Azure ARM Microsoft.Web/sites (Function Apps) requests against a CloudEmu serverless driver.
|
Package functions serves Azure ARM Microsoft.Web/sites (Function Apps) requests against a CloudEmu serverless driver. |
|
Package iam implements the Azure Microsoft.Authorization ARM REST API as a server.Handler.
|
Package iam implements the Azure Microsoft.Authorization ARM REST API as a server.Handler. |
|
Package images serves Azure ARM Microsoft.Compute/images requests.
|
Package images serves Azure ARM Microsoft.Compute/images requests. |
|
Package monitor implements the Azure microsoft.insights metric-alerts resource against a CloudEmu monitoring driver.
|
Package monitor implements the Azure microsoft.insights metric-alerts resource against a CloudEmu monitoring driver. |
|
Package mysqlflex implements the Azure Database for MySQL — Flexible Server (Microsoft.DBforMySQL/flexibleServers) ARM REST API as a server.Handler.
|
Package mysqlflex implements the Azure Database for MySQL — Flexible Server (Microsoft.DBforMySQL/flexibleServers) ARM REST API as a server.Handler. |
|
Package network implements the Microsoft.Network ARM resources we expose: virtualNetworks, subnets (nested), and networkSecurityGroups.
|
Package network implements the Microsoft.Network ARM resources we expose: virtualNetworks, subnets (nested), and networkSecurityGroups. |
|
Package postgresflex implements the Azure Database for PostgreSQL Flexible Server (Microsoft.DBforPostgreSQL/flexibleServers) ARM REST API as a server.Handler.
|
Package postgresflex implements the Azure Database for PostgreSQL Flexible Server (Microsoft.DBforPostgreSQL/flexibleServers) ARM REST API as a server.Handler. |
|
Package resourcegraph serves Azure Resource Graph (armresourcegraph) REST requests against a *resourcediscovery.Engine.
|
Package resourcegraph serves Azure Resource Graph (armresourcegraph) REST requests against a *resourcediscovery.Engine. |
|
Package servicebus serves Azure Service Bus ARM control-plane requests (Microsoft.ServiceBus/namespaces[/queues]) plus a raw-HTTP data plane for send/receive against a CloudEmu messagequeue driver.
|
Package servicebus serves Azure Service Bus ARM control-plane requests (Microsoft.ServiceBus/namespaces[/queues]) plus a raw-HTTP data plane for send/receive against a CloudEmu messagequeue driver. |
|
Package snapshots serves Azure ARM Microsoft.Compute/snapshots requests.
|
Package snapshots serves Azure ARM Microsoft.Compute/snapshots requests. |
|
Package sshpublickeys serves Azure ARM Microsoft.Compute/sshPublicKeys requests against the underlying compute driver's KeyPair operations.
|
Package sshpublickeys serves Azure ARM Microsoft.Compute/sshPublicKeys requests against the underlying compute driver's KeyPair operations. |
|
Package virtualmachines serves Azure ARM Microsoft.Compute/virtualMachines requests against a CloudEmu compute driver.
|
Package virtualmachines serves Azure ARM Microsoft.Compute/virtualMachines requests against a CloudEmu compute driver. |