forked from kubeedge/kubeedge
/
node.go
49 lines (40 loc) · 939 Bytes
/
node.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package client
import (
"github.com/kubeedge/beehive/pkg/core/context"
api "k8s.io/api/core/v1"
)
//NodesGetter to get node interface
type NodesGetter interface {
Nodes(namespace string) NodesInterface
}
//NodesInterface is interface for client nodes
type NodesInterface interface {
Create(*api.Node) (*api.Node, error)
Update(*api.Node) error
Delete(name string) error
Get(name string) (*api.Node, error)
}
type nodes struct {
namespace string
context *context.Context
send SendInterface
}
func newNodes(namespace string, c *context.Context, s SendInterface) *nodes {
return &nodes{
context: c,
send: s,
namespace: namespace,
}
}
func (c *nodes) Create(cm *api.Node) (*api.Node, error) {
return nil, nil
}
func (c *nodes) Update(cm *api.Node) error {
return nil
}
func (c *nodes) Delete(name string) error {
return nil
}
func (c *nodes) Get(name string) (*api.Node, error) {
return nil, nil
}