Documentation ¶
Overview ¶
Package endpoint is a generated GoMock package.
Package endpoint defines the interface for an endpoints provider. Endpoints providers communicate with the compute platforms and are primarily responsible for providing information regarding the endpoints for services, such as their IP addresses, port numbers and protocol information. Reference: https://github.com/flomesh-io/fsm/blob/main/DESIGN.md#3-endpoints-providers
Index ¶
- type Endpoint
- type MockProvider
- func (m *MockProvider) EXPECT() *MockProviderMockRecorder
- func (m *MockProvider) GetID() string
- func (m *MockProvider) GetResolvableEndpointsForService(arg0 service.MeshService) []Endpoint
- func (m *MockProvider) ListEndpointsForIdentity(arg0 identity.ServiceIdentity) []Endpoint
- func (m *MockProvider) ListEndpointsForService(arg0 service.MeshService) []Endpoint
- type MockProviderMockRecorder
- func (mr *MockProviderMockRecorder) GetID() *gomock.Call
- func (mr *MockProviderMockRecorder) GetResolvableEndpointsForService(arg0 interface{}) *gomock.Call
- func (mr *MockProviderMockRecorder) ListEndpointsForIdentity(arg0 interface{}) *gomock.Call
- func (mr *MockProviderMockRecorder) ListEndpointsForService(arg0 interface{}) *gomock.Call
- type Port
- type Priority
- type Provider
- type Weight
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Endpoint ¶
type Endpoint struct { net.IP `json:"ip"` Port `json:"port"` Weight `json:"weight"` Priority `json:"priority,omitempty"` // Zone is the zone the endpoint resides in. Zone string `json:"name"` // ClusterKey is a cluster key. ClusterKey string `json:"cluster,omitempty"` // LBType is a cluster load balancer type. LBType string `json:"lbType,omitempty"` // Path is a name with which a web service is accessed. Path string `json:"path,omitempty"` // ViaGw forward to a gateway's address. ViaGw string `json:"viaGw,omitempty"` }
Endpoint is a tuple of IP and Port representing an instance of a service
type MockProvider ¶
type MockProvider struct {
// contains filtered or unexported fields
}
MockProvider is a mock of Provider interface.
func NewMockProvider ¶
func NewMockProvider(ctrl *gomock.Controller) *MockProvider
NewMockProvider creates a new mock instance.
func (*MockProvider) EXPECT ¶
func (m *MockProvider) EXPECT() *MockProviderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockProvider) GetResolvableEndpointsForService ¶
func (m *MockProvider) GetResolvableEndpointsForService(arg0 service.MeshService) []Endpoint
GetResolvableEndpointsForService mocks base method.
func (*MockProvider) ListEndpointsForIdentity ¶
func (m *MockProvider) ListEndpointsForIdentity(arg0 identity.ServiceIdentity) []Endpoint
ListEndpointsForIdentity mocks base method.
func (*MockProvider) ListEndpointsForService ¶
func (m *MockProvider) ListEndpointsForService(arg0 service.MeshService) []Endpoint
ListEndpointsForService mocks base method.
type MockProviderMockRecorder ¶
type MockProviderMockRecorder struct {
// contains filtered or unexported fields
}
MockProviderMockRecorder is the mock recorder for MockProvider.
func (*MockProviderMockRecorder) GetID ¶
func (mr *MockProviderMockRecorder) GetID() *gomock.Call
GetID indicates an expected call of GetID.
func (*MockProviderMockRecorder) GetResolvableEndpointsForService ¶
func (mr *MockProviderMockRecorder) GetResolvableEndpointsForService(arg0 interface{}) *gomock.Call
GetResolvableEndpointsForService indicates an expected call of GetResolvableEndpointsForService.
func (*MockProviderMockRecorder) ListEndpointsForIdentity ¶
func (mr *MockProviderMockRecorder) ListEndpointsForIdentity(arg0 interface{}) *gomock.Call
ListEndpointsForIdentity indicates an expected call of ListEndpointsForIdentity.
func (*MockProviderMockRecorder) ListEndpointsForService ¶
func (mr *MockProviderMockRecorder) ListEndpointsForService(arg0 interface{}) *gomock.Call
ListEndpointsForService indicates an expected call of ListEndpointsForService.
type Port ¶
type Port uint32
Port is a numerical type representing a port on which a service is exposed
type Priority ¶
type Priority uint32
Priority is the priority of the remote cluster in locality based load balancing
type Provider ¶
type Provider interface { // ListEndpointsForService retrieves the IP addresses comprising the given service. ListEndpointsForService(service.MeshService) []Endpoint // ListEndpointsForIdentity retrieves the list of IP addresses for the given service account ListEndpointsForIdentity(identity.ServiceIdentity) []Endpoint // GetResolvableEndpointsForService returns the expected endpoints that are to be reached when the service FQDN is resolved under // the scope of the provider GetResolvableEndpointsForService(service.MeshService) []Endpoint // GetID returns the unique identifier of the EndpointsProvider. GetID() string }
Provider is an interface to be implemented by components abstracting Kubernetes, and other compute/cluster providers