Adding Specificator interface
package smi
import (
+ "github.com/deislabs/smi-sdk-go/pkg/apis/split/v1alpha2"
"github.com/eapache/channels"
+ v1 "k8s.io/api/core/v1"
"k8s.io/client-go/tools/cache"
+
+ "github.com/deislabs/smc/pkg/endpoint"
)
type friendlyName string
@@ -27,3 +31,18 @@ type Client struct {
informers *InformerCollection
announcements *channels.RingChannel
}
+
+// ClientIdentity is the identity of an Envoy proxy connected to the Service Mesh Controller.
+type ClientIdentity string
+
+// Specificator is an interface declaring functions, which provide the topology of a service mesh declared with SMI.
+type Specificator interface {
+ // ListTrafficSplits lists TrafficSplit SMI resources.
+ ListTrafficSplits() []*v1alpha2.TrafficSplit
+
+ // ListServices fetches all services declared with SMI Spec.
+ ListServices() []endpoint.ServiceName
+
+ // GetService fetches a specific service declared in SMI.
+ GetService(endpoint.ServiceName) (service *v1.Service, exists bool, err error)
+}
