Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions cns/dnccontract.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package cns

import "encoding/json"

// Container Network Service DNC Contract
const (
CreateOrUpdateNetworkContainer = "/network/createorupdatenetworkcontainer"
Expand All @@ -8,11 +10,16 @@ const (
GetInterfaceForContainer = "/network/getinterfaceforcontainer"
)

// Orchestrator Types
// NetworkContainer Types
const (
AzureContainerInstance = "AzureContainerInstance"
)

// Orchestrator Types
const (
Kubernetes = "Kubernetes"
)

// CreateNetworkContainerRequest specifies request to create a network container or network isolation boundary.
type CreateNetworkContainerRequest struct {
Version string
Expand All @@ -30,11 +37,11 @@ type CreateNetworkContainerRequest struct {
// OrchestratorInfo contains orchestrator type which is used to cast OrchestratorContext.
type OrchestratorInfo struct {
OrchestratorType string
OrchestratorContext interface{}
OrchestratorContext json.RawMessage
}

// AzureContainerInstanceInfo is an OrchestratorContext that holds PodName and PodNamespace.
type AzureContainerInstanceInfo struct {
// KubernetesPodInfo is an OrchestratorContext that holds PodName and PodNamespace.
type KubernetesPodInfo struct {
PodName string
PodNamespace string
}
Expand Down