Skip to content

Commit 5a2ece7

Browse files
tamilmani1989saiyan86
authored andcommitted
Modified orchestrator and containertype names in dnccontract (#113)
Modified orchestrator and containertype names in dnccontract.
1 parent 0bb2d2c commit 5a2ece7

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

cns/dnccontract.go

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package cns
22

3+
import "encoding/json"
4+
35
// Container Network Service DNC Contract
46
const (
57
CreateOrUpdateNetworkContainer = "/network/createorupdatenetworkcontainer"
@@ -8,11 +10,16 @@ const (
810
GetInterfaceForContainer = "/network/getinterfaceforcontainer"
911
)
1012

11-
// Orchestrator Types
13+
// NetworkContainer Types
1214
const (
1315
AzureContainerInstance = "AzureContainerInstance"
1416
)
1517

18+
// Orchestrator Types
19+
const (
20+
Kubernetes = "Kubernetes"
21+
)
22+
1623
// CreateNetworkContainerRequest specifies request to create a network container or network isolation boundary.
1724
type CreateNetworkContainerRequest struct {
1825
Version string
@@ -30,11 +37,11 @@ type CreateNetworkContainerRequest struct {
3037
// OrchestratorInfo contains orchestrator type which is used to cast OrchestratorContext.
3138
type OrchestratorInfo struct {
3239
OrchestratorType string
33-
OrchestratorContext interface{}
40+
OrchestratorContext json.RawMessage
3441
}
3542

36-
// AzureContainerInstanceInfo is an OrchestratorContext that holds PodName and PodNamespace.
37-
type AzureContainerInstanceInfo struct {
43+
// KubernetesPodInfo is an OrchestratorContext that holds PodName and PodNamespace.
44+
type KubernetesPodInfo struct {
3845
PodName string
3946
PodNamespace string
4047
}

0 commit comments

Comments
 (0)