plugin/kubernetes: Enable protobuf, Update client api package (#1114)
* vendor * code
This commit is contained in:
parent
45b0252c1a
commit
4b3a430ff2
1511 changed files with 286873 additions and 253612 deletions
|
@ -8,19 +8,20 @@ import (
|
|||
|
||||
"github.com/miekg/dns"
|
||||
"golang.org/x/net/context"
|
||||
"k8s.io/client-go/1.5/pkg/api"
|
||||
meta "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
api "k8s.io/client-go/pkg/api/v1"
|
||||
)
|
||||
|
||||
type APIConnReverseTest struct{}
|
||||
|
||||
func (APIConnReverseTest) Run() { return }
|
||||
func (APIConnReverseTest) Stop() error { return nil }
|
||||
func (APIConnReverseTest) PodIndex(string) []interface{} { return nil }
|
||||
func (APIConnReverseTest) Run() { return }
|
||||
func (APIConnReverseTest) Stop() error { return nil }
|
||||
func (APIConnReverseTest) PodIndex(string) []*api.Pod { return nil }
|
||||
|
||||
func (APIConnReverseTest) ServiceList() []*api.Service {
|
||||
svcs := []*api.Service{
|
||||
{
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
ObjectMeta: meta.ObjectMeta{
|
||||
Name: "svc1",
|
||||
Namespace: "testns",
|
||||
},
|
||||
|
@ -37,39 +38,38 @@ func (APIConnReverseTest) ServiceList() []*api.Service {
|
|||
return svcs
|
||||
}
|
||||
|
||||
func (APIConnReverseTest) EndpointsList() api.EndpointsList {
|
||||
return api.EndpointsList{
|
||||
Items: []api.Endpoints{
|
||||
{
|
||||
Subsets: []api.EndpointSubset{
|
||||
{
|
||||
Addresses: []api.EndpointAddress{
|
||||
{
|
||||
IP: "10.0.0.100",
|
||||
Hostname: "ep1a",
|
||||
},
|
||||
func (APIConnReverseTest) EndpointsList() []*api.Endpoints {
|
||||
eps := []*api.Endpoints{
|
||||
{
|
||||
Subsets: []api.EndpointSubset{
|
||||
{
|
||||
Addresses: []api.EndpointAddress{
|
||||
{
|
||||
IP: "10.0.0.100",
|
||||
Hostname: "ep1a",
|
||||
},
|
||||
Ports: []api.EndpointPort{
|
||||
{
|
||||
Port: 80,
|
||||
Protocol: "tcp",
|
||||
Name: "http",
|
||||
},
|
||||
},
|
||||
Ports: []api.EndpointPort{
|
||||
{
|
||||
Port: 80,
|
||||
Protocol: "tcp",
|
||||
Name: "http",
|
||||
},
|
||||
},
|
||||
},
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: "svc1",
|
||||
Namespace: "testns",
|
||||
},
|
||||
},
|
||||
ObjectMeta: meta.ObjectMeta{
|
||||
Name: "svc1",
|
||||
Namespace: "testns",
|
||||
},
|
||||
},
|
||||
}
|
||||
return eps
|
||||
}
|
||||
|
||||
func (APIConnReverseTest) GetNodeByName(name string) (api.Node, error) {
|
||||
return api.Node{
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
func (APIConnReverseTest) GetNodeByName(name string) (*api.Node, error) {
|
||||
return &api.Node{
|
||||
ObjectMeta: meta.ObjectMeta{
|
||||
Name: "test.node.foo.bar",
|
||||
},
|
||||
}, nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue