Documentation ¶
Index ¶
- Constants
- Variables
- func NewMockXdsResourceConfigClient(nodeinfo *core.Node, typedApply ApplyMockXdsResourceConfig) client.Client
- func NewTestingEventLoop(emitter TestingEmitter, syncer TestingSyncer) eventloop.EventLoop
- func NewTestingSimpleEventLoop(emitter TestingSimpleEmitter, syncers ...TestingSyncer) eventloop.SimpleEventLoop
- func RegisterMockXdsResourceDiscoveryServiceServer(s *grpc.Server, srv MockXdsResourceDiscoveryServiceServer)
- type AnotherMockResource
- func (o *AnotherMockResource) DeepCopyObject() runtime.Object
- func (*AnotherMockResource) Descriptor() ([]byte, []int)
- func (this *AnotherMockResource) Equal(that interface{}) bool
- func (m *AnotherMockResource) GetBasicField() string
- func (m *AnotherMockResource) GetMetadata() core.Metadata
- func (o *AnotherMockResource) GetObjectKind() schema.ObjectKind
- func (m *AnotherMockResource) GetStatus() core.Status
- func (r *AnotherMockResource) GroupVersionKind() schema.GroupVersionKind
- func (r *AnotherMockResource) Hash() uint64
- func (*AnotherMockResource) ProtoMessage()
- func (m *AnotherMockResource) Reset()
- func (r *AnotherMockResource) SetMetadata(meta core.Metadata)
- func (r *AnotherMockResource) SetStatus(status core.Status)
- func (m *AnotherMockResource) String() string
- func (m *AnotherMockResource) XXX_DiscardUnknown()
- func (m *AnotherMockResource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AnotherMockResource) XXX_Merge(src proto.Message)
- func (m *AnotherMockResource) XXX_Size() int
- func (m *AnotherMockResource) XXX_Unmarshal(b []byte) error
- type AnotherMockResourceClient
- func NewAnotherMockResourceClient(rcFactory factory.ResourceClientFactory) (AnotherMockResourceClient, error)
- func NewAnotherMockResourceClientWithBase(rc clients.ResourceClient) AnotherMockResourceClient
- func NewAnotherMockResourceClientWithToken(rcFactory factory.ResourceClientFactory, token string) (AnotherMockResourceClient, error)
- type AnotherMockResourceList
- func (list AnotherMockResourceList) AsInputResources() resources.InputResourceList
- func (list AnotherMockResourceList) AsInterfaces() []interface{}
- func (list AnotherMockResourceList) AsResources() resources.ResourceList
- func (list AnotherMockResourceList) Clone() AnotherMockResourceList
- func (list AnotherMockResourceList) Each(f func(element *AnotherMockResource))
- func (list AnotherMockResourceList) EachResource(f func(element resources.Resource))
- func (list AnotherMockResourceList) Find(namespace, name string) (*AnotherMockResource, error)
- func (list AnotherMockResourceList) Names() []string
- func (list AnotherMockResourceList) NamespacesDotNames() []string
- func (list AnotherMockResourceList) Sort() AnotherMockResourceList
- type AnotherMockResourceReconciler
- type AnotherMockResourceWatcher
- type ApplyMockXdsResourceConfig
- type CloneableMockCustomType
- type ClusterResource
- func (o *ClusterResource) DeepCopyObject() runtime.Object
- func (*ClusterResource) Descriptor() ([]byte, []int)
- func (this *ClusterResource) Equal(that interface{}) bool
- func (m *ClusterResource) GetBasicField() string
- func (m *ClusterResource) GetMetadata() core.Metadata
- func (o *ClusterResource) GetObjectKind() schema.ObjectKind
- func (m *ClusterResource) GetStatus() core.Status
- func (r *ClusterResource) GroupVersionKind() schema.GroupVersionKind
- func (r *ClusterResource) Hash() uint64
- func (*ClusterResource) ProtoMessage()
- func (m *ClusterResource) Reset()
- func (r *ClusterResource) SetMetadata(meta core.Metadata)
- func (r *ClusterResource) SetStatus(status core.Status)
- func (m *ClusterResource) String() string
- func (m *ClusterResource) XXX_DiscardUnknown()
- func (m *ClusterResource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ClusterResource) XXX_Merge(src proto.Message)
- func (m *ClusterResource) XXX_Size() int
- func (m *ClusterResource) XXX_Unmarshal(b []byte) error
- type ClusterResourceClient
- func NewClusterResourceClient(rcFactory factory.ResourceClientFactory) (ClusterResourceClient, error)
- func NewClusterResourceClientWithBase(rc clients.ResourceClient) ClusterResourceClient
- func NewClusterResourceClientWithToken(rcFactory factory.ResourceClientFactory, token string) (ClusterResourceClient, error)
- type ClusterResourceList
- func (list ClusterResourceList) AsInputResources() resources.InputResourceList
- func (list ClusterResourceList) AsInterfaces() []interface{}
- func (list ClusterResourceList) AsResources() resources.ResourceList
- func (list ClusterResourceList) Clone() ClusterResourceList
- func (list ClusterResourceList) Each(f func(element *ClusterResource))
- func (list ClusterResourceList) EachResource(f func(element resources.Resource))
- func (list ClusterResourceList) Find(namespace, name string) (*ClusterResource, error)
- func (list ClusterResourceList) Names() []string
- func (list ClusterResourceList) NamespacesDotNames() []string
- func (list ClusterResourceList) Sort() ClusterResourceList
- type ClusterResourceReconciler
- type ClusterResourceWatcher
- type FakeResource
- func (o *FakeResource) DeepCopyObject() runtime.Object
- func (*FakeResource) Descriptor() ([]byte, []int)
- func (this *FakeResource) Equal(that interface{}) bool
- func (m *FakeResource) GetCount() uint32
- func (m *FakeResource) GetMetadata() core.Metadata
- func (o *FakeResource) GetObjectKind() schema.ObjectKind
- func (r *FakeResource) GroupVersionKind() schema.GroupVersionKind
- func (r *FakeResource) Hash() uint64
- func (*FakeResource) ProtoMessage()
- func (m *FakeResource) Reset()
- func (r *FakeResource) SetMetadata(meta core.Metadata)
- func (m *FakeResource) String() string
- func (m *FakeResource) XXX_DiscardUnknown()
- func (m *FakeResource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *FakeResource) XXX_Merge(src proto.Message)
- func (m *FakeResource) XXX_Size() int
- func (m *FakeResource) XXX_Unmarshal(b []byte) error
- type FakeResourceClient
- type FakeResourceList
- func (list FakeResourceList) AsInterfaces() []interface{}
- func (list FakeResourceList) AsResources() resources.ResourceList
- func (list FakeResourceList) Clone() FakeResourceList
- func (list FakeResourceList) Each(f func(element *FakeResource))
- func (list FakeResourceList) EachResource(f func(element resources.Resource))
- func (list FakeResourceList) Find(namespace, name string) (*FakeResource, error)
- func (list FakeResourceList) Names() []string
- func (list FakeResourceList) NamespacesDotNames() []string
- func (list FakeResourceList) Sort() FakeResourceList
- type FakeResourceReconciler
- type FakeResourceWatcher
- type MockCustomType
- type MockCustomTypeClient
- func NewMockCustomTypeClient(rcFactory factory.ResourceClientFactory) (MockCustomTypeClient, error)
- func NewMockCustomTypeClientWithBase(rc clients.ResourceClient) MockCustomTypeClient
- func NewMockCustomTypeClientWithToken(rcFactory factory.ResourceClientFactory, token string) (MockCustomTypeClient, error)
- type MockCustomTypeList
- func (list MockCustomTypeList) AsInterfaces() []interface{}
- func (list MockCustomTypeList) AsResources() resources.ResourceList
- func (list MockCustomTypeList) Clone() MockCustomTypeList
- func (list MockCustomTypeList) Each(f func(element *MockCustomType))
- func (list MockCustomTypeList) EachResource(f func(element resources.Resource))
- func (list MockCustomTypeList) Find(namespace, name string) (*MockCustomType, error)
- func (list MockCustomTypeList) Names() []string
- func (list MockCustomTypeList) NamespacesDotNames() []string
- func (list MockCustomTypeList) Sort() MockCustomTypeList
- type MockCustomTypeReconciler
- type MockCustomTypeWatcher
- type MockResource
- func (o *MockResource) DeepCopyObject() runtime.Object
- func (*MockResource) Descriptor() ([]byte, []int)
- func (this *MockResource) Equal(that interface{}) bool
- func (m *MockResource) GetData() string
- func (m *MockResource) GetMetadata() core.Metadata
- func (o *MockResource) GetObjectKind() schema.ObjectKind
- func (m *MockResource) GetOneofOne() string
- func (m *MockResource) GetOneofTwo() bool
- func (m *MockResource) GetSomeDumbField() string
- func (m *MockResource) GetStatus() core.Status
- func (m *MockResource) GetTestOneofFields() isMockResource_TestOneofFields
- func (r *MockResource) GroupVersionKind() schema.GroupVersionKind
- func (r *MockResource) Hash() uint64
- func (*MockResource) ProtoMessage()
- func (m *MockResource) Reset()
- func (r *MockResource) SetMetadata(meta core.Metadata)
- func (r *MockResource) SetStatus(status core.Status)
- func (m *MockResource) String() string
- func (m *MockResource) XXX_DiscardUnknown()
- func (m *MockResource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MockResource) XXX_Merge(src proto.Message)
- func (*MockResource) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- func (m *MockResource) XXX_Size() int
- func (m *MockResource) XXX_Unmarshal(b []byte) error
- type MockResourceClient
- type MockResourceList
- func (list MockResourceList) AsInputResources() resources.InputResourceList
- func (list MockResourceList) AsInterfaces() []interface{}
- func (list MockResourceList) AsResources() resources.ResourceList
- func (list MockResourceList) Clone() MockResourceList
- func (list MockResourceList) Each(f func(element *MockResource))
- func (list MockResourceList) EachResource(f func(element resources.Resource))
- func (list MockResourceList) Find(namespace, name string) (*MockResource, error)
- func (list MockResourceList) Names() []string
- func (list MockResourceList) NamespacesDotNames() []string
- func (list MockResourceList) Sort() MockResourceList
- type MockResourceReconciler
- type MockResourceWatcher
- type MockResource_OneofOne
- type MockResource_OneofTwo
- type MockXdsResourceConfig
- func (*MockXdsResourceConfig) Descriptor() ([]byte, []int)
- func (this *MockXdsResourceConfig) Equal(that interface{}) bool
- func (m *MockXdsResourceConfig) GetDomain() string
- func (*MockXdsResourceConfig) ProtoMessage()
- func (m *MockXdsResourceConfig) Reset()
- func (m *MockXdsResourceConfig) String() string
- func (m *MockXdsResourceConfig) XXX_DiscardUnknown()
- func (m *MockXdsResourceConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MockXdsResourceConfig) XXX_Merge(src proto.Message)
- func (m *MockXdsResourceConfig) XXX_Size() int
- func (m *MockXdsResourceConfig) XXX_Unmarshal(b []byte) error
- type MockXdsResourceConfigXdsResourceWrapper
- type MockXdsResourceDiscoveryServiceClient
- type MockXdsResourceDiscoveryServiceServer
- type MockXdsResourceDiscoveryService_DeltaMockXdsResourceConfigClient
- type MockXdsResourceDiscoveryService_DeltaMockXdsResourceConfigServer
- type MockXdsResourceDiscoveryService_StreamMockXdsResourceConfigClient
- type MockXdsResourceDiscoveryService_StreamMockXdsResourceConfigServer
- type TestingEmitter
- type TestingSimpleEmitter
- type TestingSnapshot
- type TestingSnapshotStringer
- type TestingSyncDeciderdeprecated
- type TestingSyncDeciderWithContext
- type TestingSyncer
- type TestingSyncers
- type TransitionAnotherMockResourceFunc
- type TransitionClusterResourceFunc
- type TransitionFakeResourceFunc
- type TransitionMockCustomTypeFunc
- type TransitionMockResourceFunc
- type UnimplementedMockXdsResourceDiscoveryServiceServer
- func (*UnimplementedMockXdsResourceDiscoveryServiceServer) DeltaMockXdsResourceConfig(srv MockXdsResourceDiscoveryService_DeltaMockXdsResourceConfigServer) error
- func (*UnimplementedMockXdsResourceDiscoveryServiceServer) FetchMockXdsResourceConfig(ctx context.Context, req *v2.DiscoveryRequest) (*v2.DiscoveryResponse, error)
- func (*UnimplementedMockXdsResourceDiscoveryServiceServer) StreamMockXdsResourceConfig(srv MockXdsResourceDiscoveryService_StreamMockXdsResourceConfigServer) error
Constants ¶
const MockXdsResourceConfigType = cache.TypePrefix + "/testing.solo.io.MockXdsResourceConfig"
Variables ¶
var ( AnotherMockResourceCrd = crd.NewCrd( "anothermockresources", AnotherMockResourceGVK.Group, AnotherMockResourceGVK.Version, AnotherMockResourceGVK.Kind, "amr", false, &AnotherMockResource{}) )
var (
AnotherMockResourceGVK = schema.GroupVersionKind{
Version: "v1",
Group: "testing.solo.io",
Kind: "AnotherMockResource",
}
)
var ( ClusterResourceCrd = crd.NewCrd( "clusterresources", ClusterResourceGVK.Group, ClusterResourceGVK.Version, ClusterResourceGVK.Kind, "clr", true, &ClusterResource{}) )
var (
ClusterResourceGVK = schema.GroupVersionKind{
Version: "v1",
Group: "testing.solo.io",
Kind: "ClusterResource",
}
)
var ( FakeResourceCrd = crd.NewCrd( "fakes", FakeResourceGVK.Group, FakeResourceGVK.Version, FakeResourceGVK.Kind, "fk", false, &FakeResource{}) )
var (
FakeResourceGVK = schema.GroupVersionKind{
Version: "v1",
Group: "testing.solo.io",
Kind: "FakeResource",
}
)
var (
MockCustomTypeGVK = schema.GroupVersionKind{
Version: "v1",
Group: "testing.solo.io",
Kind: "MockCustomType",
}
)
var ( MockResourceCrd = crd.NewCrd( "mocks", MockResourceGVK.Group, MockResourceGVK.Version, MockResourceGVK.Kind, "mk", false, &MockResource{}) )
var (
MockResourceGVK = schema.GroupVersionKind{
Version: "v1",
Group: "testing.solo.io",
Kind: "MockResource",
}
)
var MockXdsResourceConfigTypeRecord = client.NewTypeRecord( MockXdsResourceConfigType, func() cache.ResourceProto { return &MockXdsResourceConfig{} }, func(r cache.ResourceProto) cache.Resource { return &MockXdsResourceConfigXdsResourceWrapper{Resource: r.(*MockXdsResourceConfig)} }, )
Define a type record. This is used by the generic client library.
Functions ¶
func NewMockXdsResourceConfigClient ¶
func NewMockXdsResourceConfigClient(nodeinfo *core.Node, typedApply ApplyMockXdsResourceConfig) client.Client
func NewTestingEventLoop ¶
func NewTestingEventLoop(emitter TestingEmitter, syncer TestingSyncer) eventloop.EventLoop
func NewTestingSimpleEventLoop ¶
func NewTestingSimpleEventLoop(emitter TestingSimpleEmitter, syncers ...TestingSyncer) eventloop.SimpleEventLoop
func RegisterMockXdsResourceDiscoveryServiceServer ¶
func RegisterMockXdsResourceDiscoveryServiceServer(s *grpc.Server, srv MockXdsResourceDiscoveryServiceServer)
Types ¶
type AnotherMockResource ¶
type AnotherMockResource struct { Metadata core.Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata"` Status core.Status `protobuf:"bytes,6,opt,name=status,proto3" json:"status"` // comments that go above the basic field in our docs BasicField string `protobuf:"bytes,2,opt,name=basic_field,json=basicField,proto3" json:"basic_field,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Description of the AnotherMockResource
func NewAnotherMockResource ¶
func NewAnotherMockResource(namespace, name string) *AnotherMockResource
func (*AnotherMockResource) DeepCopyObject ¶
func (o *AnotherMockResource) DeepCopyObject() runtime.Object
func (*AnotherMockResource) Descriptor ¶
func (*AnotherMockResource) Descriptor() ([]byte, []int)
func (*AnotherMockResource) Equal ¶
func (this *AnotherMockResource) Equal(that interface{}) bool
func (*AnotherMockResource) GetBasicField ¶
func (m *AnotherMockResource) GetBasicField() string
func (*AnotherMockResource) GetMetadata ¶
func (m *AnotherMockResource) GetMetadata() core.Metadata
func (*AnotherMockResource) GetObjectKind ¶
func (o *AnotherMockResource) GetObjectKind() schema.ObjectKind
func (*AnotherMockResource) GetStatus ¶
func (m *AnotherMockResource) GetStatus() core.Status
func (*AnotherMockResource) GroupVersionKind ¶ added in v0.10.4
func (r *AnotherMockResource) GroupVersionKind() schema.GroupVersionKind
func (*AnotherMockResource) Hash ¶
func (r *AnotherMockResource) Hash() uint64
func (*AnotherMockResource) ProtoMessage ¶
func (*AnotherMockResource) ProtoMessage()
func (*AnotherMockResource) Reset ¶
func (m *AnotherMockResource) Reset()
func (*AnotherMockResource) SetMetadata ¶
func (r *AnotherMockResource) SetMetadata(meta core.Metadata)
func (*AnotherMockResource) SetStatus ¶
func (r *AnotherMockResource) SetStatus(status core.Status)
func (*AnotherMockResource) String ¶
func (m *AnotherMockResource) String() string
func (*AnotherMockResource) XXX_DiscardUnknown ¶
func (m *AnotherMockResource) XXX_DiscardUnknown()
func (*AnotherMockResource) XXX_Marshal ¶
func (m *AnotherMockResource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AnotherMockResource) XXX_Merge ¶
func (m *AnotherMockResource) XXX_Merge(src proto.Message)
func (*AnotherMockResource) XXX_Size ¶
func (m *AnotherMockResource) XXX_Size() int
func (*AnotherMockResource) XXX_Unmarshal ¶
func (m *AnotherMockResource) XXX_Unmarshal(b []byte) error
type AnotherMockResourceClient ¶
type AnotherMockResourceClient interface { BaseClient() clients.ResourceClient Register() error Read(namespace, name string, opts clients.ReadOpts) (*AnotherMockResource, error) Write(resource *AnotherMockResource, opts clients.WriteOpts) (*AnotherMockResource, error) Delete(namespace, name string, opts clients.DeleteOpts) error List(namespace string, opts clients.ListOpts) (AnotherMockResourceList, error) AnotherMockResourceWatcher }
func NewAnotherMockResourceClient ¶
func NewAnotherMockResourceClient(rcFactory factory.ResourceClientFactory) (AnotherMockResourceClient, error)
func NewAnotherMockResourceClientWithBase ¶
func NewAnotherMockResourceClientWithBase(rc clients.ResourceClient) AnotherMockResourceClient
func NewAnotherMockResourceClientWithToken ¶
func NewAnotherMockResourceClientWithToken(rcFactory factory.ResourceClientFactory, token string) (AnotherMockResourceClient, error)
type AnotherMockResourceList ¶
type AnotherMockResourceList []*AnotherMockResource
func (AnotherMockResourceList) AsInputResources ¶
func (list AnotherMockResourceList) AsInputResources() resources.InputResourceList
func (AnotherMockResourceList) AsInterfaces ¶
func (list AnotherMockResourceList) AsInterfaces() []interface{}
func (AnotherMockResourceList) AsResources ¶
func (list AnotherMockResourceList) AsResources() resources.ResourceList
func (AnotherMockResourceList) Clone ¶
func (list AnotherMockResourceList) Clone() AnotherMockResourceList
func (AnotherMockResourceList) Each ¶
func (list AnotherMockResourceList) Each(f func(element *AnotherMockResource))
func (AnotherMockResourceList) EachResource ¶
func (list AnotherMockResourceList) EachResource(f func(element resources.Resource))
func (AnotherMockResourceList) Find ¶
func (list AnotherMockResourceList) Find(namespace, name string) (*AnotherMockResource, error)
namespace is optional, if left empty, names can collide if the list contains more than one with the same name
func (AnotherMockResourceList) Names ¶
func (list AnotherMockResourceList) Names() []string
func (AnotherMockResourceList) NamespacesDotNames ¶
func (list AnotherMockResourceList) NamespacesDotNames() []string
func (AnotherMockResourceList) Sort ¶
func (list AnotherMockResourceList) Sort() AnotherMockResourceList
type AnotherMockResourceReconciler ¶
type AnotherMockResourceReconciler interface {
Reconcile(namespace string, desiredResources AnotherMockResourceList, transition TransitionAnotherMockResourceFunc, opts clients.ListOpts) error
}
func NewAnotherMockResourceReconciler ¶
func NewAnotherMockResourceReconciler(client AnotherMockResourceClient) AnotherMockResourceReconciler
type ApplyMockXdsResourceConfig ¶
type ApplyMockXdsResourceConfig func(version string, resources []*MockXdsResourceConfig) error
The apply functions receives resources and returns an error if they were applied correctly. In theory the configuration can become valid in the future (i.e. eventually consistent), but I don't think we need to worry about that now As our current use cases only have one configuration resource, so no interactions are expected.
type CloneableMockCustomType ¶
type CloneableMockCustomType interface { resources.Resource Clone() *github_com_solo_io_solo_kit_test_mocks_api_v1_customtype.MockCustomType }
type ClusterResource ¶
type ClusterResource struct { Metadata core.Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata"` Status core.Status `protobuf:"bytes,6,opt,name=status,proto3" json:"status"` // comments that go above the basic field in our docs BasicField string `protobuf:"bytes,2,opt,name=basic_field,json=basicField,proto3" json:"basic_field,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func NewClusterResource ¶
func NewClusterResource(namespace, name string) *ClusterResource
func (*ClusterResource) DeepCopyObject ¶
func (o *ClusterResource) DeepCopyObject() runtime.Object
func (*ClusterResource) Descriptor ¶
func (*ClusterResource) Descriptor() ([]byte, []int)
func (*ClusterResource) Equal ¶
func (this *ClusterResource) Equal(that interface{}) bool
func (*ClusterResource) GetBasicField ¶
func (m *ClusterResource) GetBasicField() string
func (*ClusterResource) GetMetadata ¶
func (m *ClusterResource) GetMetadata() core.Metadata
func (*ClusterResource) GetObjectKind ¶
func (o *ClusterResource) GetObjectKind() schema.ObjectKind
func (*ClusterResource) GetStatus ¶
func (m *ClusterResource) GetStatus() core.Status
func (*ClusterResource) GroupVersionKind ¶ added in v0.10.4
func (r *ClusterResource) GroupVersionKind() schema.GroupVersionKind
func (*ClusterResource) Hash ¶
func (r *ClusterResource) Hash() uint64
func (*ClusterResource) ProtoMessage ¶
func (*ClusterResource) ProtoMessage()
func (*ClusterResource) Reset ¶
func (m *ClusterResource) Reset()
func (*ClusterResource) SetMetadata ¶
func (r *ClusterResource) SetMetadata(meta core.Metadata)
func (*ClusterResource) SetStatus ¶
func (r *ClusterResource) SetStatus(status core.Status)
func (*ClusterResource) String ¶
func (m *ClusterResource) String() string
func (*ClusterResource) XXX_DiscardUnknown ¶
func (m *ClusterResource) XXX_DiscardUnknown()
func (*ClusterResource) XXX_Marshal ¶
func (m *ClusterResource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ClusterResource) XXX_Merge ¶
func (m *ClusterResource) XXX_Merge(src proto.Message)
func (*ClusterResource) XXX_Size ¶
func (m *ClusterResource) XXX_Size() int
func (*ClusterResource) XXX_Unmarshal ¶
func (m *ClusterResource) XXX_Unmarshal(b []byte) error
type ClusterResourceClient ¶
type ClusterResourceClient interface { BaseClient() clients.ResourceClient Register() error Read(name string, opts clients.ReadOpts) (*ClusterResource, error) Write(resource *ClusterResource, opts clients.WriteOpts) (*ClusterResource, error) Delete(name string, opts clients.DeleteOpts) error List(opts clients.ListOpts) (ClusterResourceList, error) ClusterResourceWatcher }
func NewClusterResourceClient ¶
func NewClusterResourceClient(rcFactory factory.ResourceClientFactory) (ClusterResourceClient, error)
func NewClusterResourceClientWithBase ¶
func NewClusterResourceClientWithBase(rc clients.ResourceClient) ClusterResourceClient
func NewClusterResourceClientWithToken ¶
func NewClusterResourceClientWithToken(rcFactory factory.ResourceClientFactory, token string) (ClusterResourceClient, error)
type ClusterResourceList ¶
type ClusterResourceList []*ClusterResource
func (ClusterResourceList) AsInputResources ¶
func (list ClusterResourceList) AsInputResources() resources.InputResourceList
func (ClusterResourceList) AsInterfaces ¶
func (list ClusterResourceList) AsInterfaces() []interface{}
func (ClusterResourceList) AsResources ¶
func (list ClusterResourceList) AsResources() resources.ResourceList
func (ClusterResourceList) Clone ¶
func (list ClusterResourceList) Clone() ClusterResourceList
func (ClusterResourceList) Each ¶
func (list ClusterResourceList) Each(f func(element *ClusterResource))
func (ClusterResourceList) EachResource ¶
func (list ClusterResourceList) EachResource(f func(element resources.Resource))
func (ClusterResourceList) Find ¶
func (list ClusterResourceList) Find(namespace, name string) (*ClusterResource, error)
namespace is optional, if left empty, names can collide if the list contains more than one with the same name
func (ClusterResourceList) Names ¶
func (list ClusterResourceList) Names() []string
func (ClusterResourceList) NamespacesDotNames ¶
func (list ClusterResourceList) NamespacesDotNames() []string
func (ClusterResourceList) Sort ¶
func (list ClusterResourceList) Sort() ClusterResourceList
type ClusterResourceReconciler ¶
type ClusterResourceReconciler interface {
Reconcile(namespace string, desiredResources ClusterResourceList, transition TransitionClusterResourceFunc, opts clients.ListOpts) error
}
func NewClusterResourceReconciler ¶
func NewClusterResourceReconciler(client ClusterResourceClient) ClusterResourceReconciler
type ClusterResourceWatcher ¶
type ClusterResourceWatcher interface { // watch cluster-scoped Clusterresources Watch(opts clients.WatchOpts) (<-chan ClusterResourceList, <-chan error, error) }
type FakeResource ¶
type FakeResource struct { Count uint32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` Metadata core.Metadata `protobuf:"bytes,7,opt,name=metadata,proto3" json:"metadata"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func NewFakeResource ¶
func NewFakeResource(namespace, name string) *FakeResource
func (*FakeResource) DeepCopyObject ¶
func (o *FakeResource) DeepCopyObject() runtime.Object
func (*FakeResource) Descriptor ¶
func (*FakeResource) Descriptor() ([]byte, []int)
func (*FakeResource) Equal ¶
func (this *FakeResource) Equal(that interface{}) bool
func (*FakeResource) GetCount ¶
func (m *FakeResource) GetCount() uint32
func (*FakeResource) GetMetadata ¶
func (m *FakeResource) GetMetadata() core.Metadata
func (*FakeResource) GetObjectKind ¶
func (o *FakeResource) GetObjectKind() schema.ObjectKind
func (*FakeResource) GroupVersionKind ¶ added in v0.10.4
func (r *FakeResource) GroupVersionKind() schema.GroupVersionKind
func (*FakeResource) Hash ¶
func (r *FakeResource) Hash() uint64
func (*FakeResource) ProtoMessage ¶
func (*FakeResource) ProtoMessage()
func (*FakeResource) Reset ¶
func (m *FakeResource) Reset()
func (*FakeResource) SetMetadata ¶
func (r *FakeResource) SetMetadata(meta core.Metadata)
func (*FakeResource) String ¶
func (m *FakeResource) String() string
func (*FakeResource) XXX_DiscardUnknown ¶
func (m *FakeResource) XXX_DiscardUnknown()
func (*FakeResource) XXX_Marshal ¶
func (m *FakeResource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*FakeResource) XXX_Merge ¶
func (m *FakeResource) XXX_Merge(src proto.Message)
func (*FakeResource) XXX_Size ¶
func (m *FakeResource) XXX_Size() int
func (*FakeResource) XXX_Unmarshal ¶
func (m *FakeResource) XXX_Unmarshal(b []byte) error
type FakeResourceClient ¶
type FakeResourceClient interface { BaseClient() clients.ResourceClient Register() error Read(namespace, name string, opts clients.ReadOpts) (*FakeResource, error) Write(resource *FakeResource, opts clients.WriteOpts) (*FakeResource, error) Delete(namespace, name string, opts clients.DeleteOpts) error List(namespace string, opts clients.ListOpts) (FakeResourceList, error) FakeResourceWatcher }
func NewFakeResourceClient ¶
func NewFakeResourceClient(rcFactory factory.ResourceClientFactory) (FakeResourceClient, error)
func NewFakeResourceClientWithBase ¶
func NewFakeResourceClientWithBase(rc clients.ResourceClient) FakeResourceClient
func NewFakeResourceClientWithToken ¶
func NewFakeResourceClientWithToken(rcFactory factory.ResourceClientFactory, token string) (FakeResourceClient, error)
type FakeResourceList ¶
type FakeResourceList []*FakeResource
func (FakeResourceList) AsInterfaces ¶
func (list FakeResourceList) AsInterfaces() []interface{}
func (FakeResourceList) AsResources ¶
func (list FakeResourceList) AsResources() resources.ResourceList
func (FakeResourceList) Clone ¶
func (list FakeResourceList) Clone() FakeResourceList
func (FakeResourceList) Each ¶
func (list FakeResourceList) Each(f func(element *FakeResource))
func (FakeResourceList) EachResource ¶
func (list FakeResourceList) EachResource(f func(element resources.Resource))
func (FakeResourceList) Find ¶
func (list FakeResourceList) Find(namespace, name string) (*FakeResource, error)
namespace is optional, if left empty, names can collide if the list contains more than one with the same name
func (FakeResourceList) Names ¶
func (list FakeResourceList) Names() []string
func (FakeResourceList) NamespacesDotNames ¶
func (list FakeResourceList) NamespacesDotNames() []string
func (FakeResourceList) Sort ¶
func (list FakeResourceList) Sort() FakeResourceList
type FakeResourceReconciler ¶
type FakeResourceReconciler interface {
Reconcile(namespace string, desiredResources FakeResourceList, transition TransitionFakeResourceFunc, opts clients.ListOpts) error
}
func NewFakeResourceReconciler ¶
func NewFakeResourceReconciler(client FakeResourceClient) FakeResourceReconciler
type FakeResourceWatcher ¶
type MockCustomType ¶
type MockCustomType struct {
github_com_solo_io_solo_kit_test_mocks_api_v1_customtype.MockCustomType
}
func NewMockCustomType ¶
func NewMockCustomType(namespace, name string) *MockCustomType
func (*MockCustomType) Clone ¶
func (r *MockCustomType) Clone() resources.Resource
func (*MockCustomType) GroupVersionKind ¶ added in v0.10.4
func (r *MockCustomType) GroupVersionKind() schema.GroupVersionKind
func (*MockCustomType) Hash ¶
func (r *MockCustomType) Hash() uint64
type MockCustomTypeClient ¶
type MockCustomTypeClient interface { BaseClient() clients.ResourceClient Register() error Read(namespace, name string, opts clients.ReadOpts) (*MockCustomType, error) Write(resource *MockCustomType, opts clients.WriteOpts) (*MockCustomType, error) Delete(namespace, name string, opts clients.DeleteOpts) error List(namespace string, opts clients.ListOpts) (MockCustomTypeList, error) MockCustomTypeWatcher }
func NewMockCustomTypeClient ¶
func NewMockCustomTypeClient(rcFactory factory.ResourceClientFactory) (MockCustomTypeClient, error)
func NewMockCustomTypeClientWithBase ¶
func NewMockCustomTypeClientWithBase(rc clients.ResourceClient) MockCustomTypeClient
func NewMockCustomTypeClientWithToken ¶
func NewMockCustomTypeClientWithToken(rcFactory factory.ResourceClientFactory, token string) (MockCustomTypeClient, error)
type MockCustomTypeList ¶
type MockCustomTypeList []*MockCustomType
func (MockCustomTypeList) AsInterfaces ¶
func (list MockCustomTypeList) AsInterfaces() []interface{}
func (MockCustomTypeList) AsResources ¶
func (list MockCustomTypeList) AsResources() resources.ResourceList
func (MockCustomTypeList) Clone ¶
func (list MockCustomTypeList) Clone() MockCustomTypeList
func (MockCustomTypeList) Each ¶
func (list MockCustomTypeList) Each(f func(element *MockCustomType))
func (MockCustomTypeList) EachResource ¶
func (list MockCustomTypeList) EachResource(f func(element resources.Resource))
func (MockCustomTypeList) Find ¶
func (list MockCustomTypeList) Find(namespace, name string) (*MockCustomType, error)
namespace is optional, if left empty, names can collide if the list contains more than one with the same name
func (MockCustomTypeList) Names ¶
func (list MockCustomTypeList) Names() []string
func (MockCustomTypeList) NamespacesDotNames ¶
func (list MockCustomTypeList) NamespacesDotNames() []string
func (MockCustomTypeList) Sort ¶
func (list MockCustomTypeList) Sort() MockCustomTypeList
type MockCustomTypeReconciler ¶
type MockCustomTypeReconciler interface {
Reconcile(namespace string, desiredResources MockCustomTypeList, transition TransitionMockCustomTypeFunc, opts clients.ListOpts) error
}
func NewMockCustomTypeReconciler ¶
func NewMockCustomTypeReconciler(client MockCustomTypeClient) MockCustomTypeReconciler
type MockCustomTypeWatcher ¶
type MockResource ¶
type MockResource struct { Status core.Status `protobuf:"bytes,6,opt,name=status,proto3" json:"status"` Metadata core.Metadata `protobuf:"bytes,7,opt,name=metadata,proto3" json:"metadata"` Data string `protobuf:"bytes,1,opt,name=data,json=data.json,proto3" json:"data.json"` SomeDumbField string `protobuf:"bytes,100,opt,name=some_dumb_field,json=someDumbField,proto3" json:"some_dumb_field,omitempty"` // Types that are valid to be assigned to TestOneofFields: // *MockResource_OneofOne // *MockResource_OneofTwo TestOneofFields isMockResource_TestOneofFields `protobuf_oneof:"test_oneof_fields"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Mock resources for goofin off
func NewMockResource ¶
func NewMockResource(namespace, name string) *MockResource
func (*MockResource) DeepCopyObject ¶
func (o *MockResource) DeepCopyObject() runtime.Object
func (*MockResource) Descriptor ¶
func (*MockResource) Descriptor() ([]byte, []int)
func (*MockResource) Equal ¶
func (this *MockResource) Equal(that interface{}) bool
func (*MockResource) GetData ¶
func (m *MockResource) GetData() string
func (*MockResource) GetMetadata ¶
func (m *MockResource) GetMetadata() core.Metadata
func (*MockResource) GetObjectKind ¶
func (o *MockResource) GetObjectKind() schema.ObjectKind
func (*MockResource) GetOneofOne ¶
func (m *MockResource) GetOneofOne() string
func (*MockResource) GetOneofTwo ¶
func (m *MockResource) GetOneofTwo() bool
func (*MockResource) GetSomeDumbField ¶
func (m *MockResource) GetSomeDumbField() string
func (*MockResource) GetStatus ¶
func (m *MockResource) GetStatus() core.Status
func (*MockResource) GetTestOneofFields ¶
func (m *MockResource) GetTestOneofFields() isMockResource_TestOneofFields
func (*MockResource) GroupVersionKind ¶ added in v0.10.4
func (r *MockResource) GroupVersionKind() schema.GroupVersionKind
func (*MockResource) Hash ¶
func (r *MockResource) Hash() uint64
func (*MockResource) ProtoMessage ¶
func (*MockResource) ProtoMessage()
func (*MockResource) Reset ¶
func (m *MockResource) Reset()
func (*MockResource) SetMetadata ¶
func (r *MockResource) SetMetadata(meta core.Metadata)
func (*MockResource) SetStatus ¶
func (r *MockResource) SetStatus(status core.Status)
func (*MockResource) String ¶
func (m *MockResource) String() string
func (*MockResource) XXX_DiscardUnknown ¶
func (m *MockResource) XXX_DiscardUnknown()
func (*MockResource) XXX_Marshal ¶
func (m *MockResource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MockResource) XXX_Merge ¶
func (m *MockResource) XXX_Merge(src proto.Message)
func (*MockResource) XXX_OneofFuncs ¶
func (*MockResource) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})
XXX_OneofFuncs is for the internal use of the proto package.
func (*MockResource) XXX_Size ¶
func (m *MockResource) XXX_Size() int
func (*MockResource) XXX_Unmarshal ¶
func (m *MockResource) XXX_Unmarshal(b []byte) error
type MockResourceClient ¶
type MockResourceClient interface { BaseClient() clients.ResourceClient Register() error Read(namespace, name string, opts clients.ReadOpts) (*MockResource, error) Write(resource *MockResource, opts clients.WriteOpts) (*MockResource, error) Delete(namespace, name string, opts clients.DeleteOpts) error List(namespace string, opts clients.ListOpts) (MockResourceList, error) MockResourceWatcher }
func NewMockResourceClient ¶
func NewMockResourceClient(rcFactory factory.ResourceClientFactory) (MockResourceClient, error)
func NewMockResourceClientWithBase ¶
func NewMockResourceClientWithBase(rc clients.ResourceClient) MockResourceClient
func NewMockResourceClientWithToken ¶
func NewMockResourceClientWithToken(rcFactory factory.ResourceClientFactory, token string) (MockResourceClient, error)
type MockResourceList ¶
type MockResourceList []*MockResource
func (MockResourceList) AsInputResources ¶
func (list MockResourceList) AsInputResources() resources.InputResourceList
func (MockResourceList) AsInterfaces ¶
func (list MockResourceList) AsInterfaces() []interface{}
func (MockResourceList) AsResources ¶
func (list MockResourceList) AsResources() resources.ResourceList
func (MockResourceList) Clone ¶
func (list MockResourceList) Clone() MockResourceList
func (MockResourceList) Each ¶
func (list MockResourceList) Each(f func(element *MockResource))
func (MockResourceList) EachResource ¶
func (list MockResourceList) EachResource(f func(element resources.Resource))
func (MockResourceList) Find ¶
func (list MockResourceList) Find(namespace, name string) (*MockResource, error)
namespace is optional, if left empty, names can collide if the list contains more than one with the same name
func (MockResourceList) Names ¶
func (list MockResourceList) Names() []string
func (MockResourceList) NamespacesDotNames ¶
func (list MockResourceList) NamespacesDotNames() []string
func (MockResourceList) Sort ¶
func (list MockResourceList) Sort() MockResourceList
type MockResourceReconciler ¶
type MockResourceReconciler interface {
Reconcile(namespace string, desiredResources MockResourceList, transition TransitionMockResourceFunc, opts clients.ListOpts) error
}
func NewMockResourceReconciler ¶
func NewMockResourceReconciler(client MockResourceClient) MockResourceReconciler
type MockResourceWatcher ¶
type MockResource_OneofOne ¶
type MockResource_OneofOne struct {
OneofOne string `protobuf:"bytes,3,opt,name=oneof_one,json=oneofOne,proto3,oneof"`
}
func (*MockResource_OneofOne) Equal ¶
func (this *MockResource_OneofOne) Equal(that interface{}) bool
type MockResource_OneofTwo ¶
type MockResource_OneofTwo struct {
OneofTwo bool `protobuf:"varint,2,opt,name=oneof_two,json=oneofTwo,proto3,oneof"`
}
func (*MockResource_OneofTwo) Equal ¶
func (this *MockResource_OneofTwo) Equal(that interface{}) bool
type MockXdsResourceConfig ¶
type MockXdsResourceConfig struct { // @solo-kit:resource.name Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
@solo-kit:xds-service=MockXdsResourceDiscoveryService @solo-kit:resource.no_references
func (*MockXdsResourceConfig) Descriptor ¶
func (*MockXdsResourceConfig) Descriptor() ([]byte, []int)
func (*MockXdsResourceConfig) Equal ¶
func (this *MockXdsResourceConfig) Equal(that interface{}) bool
func (*MockXdsResourceConfig) GetDomain ¶
func (m *MockXdsResourceConfig) GetDomain() string
func (*MockXdsResourceConfig) ProtoMessage ¶
func (*MockXdsResourceConfig) ProtoMessage()
func (*MockXdsResourceConfig) Reset ¶
func (m *MockXdsResourceConfig) Reset()
func (*MockXdsResourceConfig) String ¶
func (m *MockXdsResourceConfig) String() string
func (*MockXdsResourceConfig) XXX_DiscardUnknown ¶
func (m *MockXdsResourceConfig) XXX_DiscardUnknown()
func (*MockXdsResourceConfig) XXX_Marshal ¶
func (m *MockXdsResourceConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MockXdsResourceConfig) XXX_Merge ¶
func (m *MockXdsResourceConfig) XXX_Merge(src proto.Message)
func (*MockXdsResourceConfig) XXX_Size ¶
func (m *MockXdsResourceConfig) XXX_Size() int
func (*MockXdsResourceConfig) XXX_Unmarshal ¶
func (m *MockXdsResourceConfig) XXX_Unmarshal(b []byte) error
type MockXdsResourceConfigXdsResourceWrapper ¶
type MockXdsResourceConfigXdsResourceWrapper struct { // TODO(yuval-k): This is public for mitchellh hashstructure to work properly. consider better alternatives. Resource *MockXdsResourceConfig }
Defined a resource - to be used by snapshot
func NewMockXdsResourceConfigXdsResourceWrapper ¶
func NewMockXdsResourceConfigXdsResourceWrapper(resourceProto *MockXdsResourceConfig) *MockXdsResourceConfigXdsResourceWrapper
func (*MockXdsResourceConfigXdsResourceWrapper) References ¶
func (e *MockXdsResourceConfigXdsResourceWrapper) References() []cache.XdsResourceReference
func (*MockXdsResourceConfigXdsResourceWrapper) ResourceProto ¶
func (e *MockXdsResourceConfigXdsResourceWrapper) ResourceProto() cache.ResourceProto
func (*MockXdsResourceConfigXdsResourceWrapper) Self ¶
func (e *MockXdsResourceConfigXdsResourceWrapper) Self() cache.XdsResourceReference
type MockXdsResourceDiscoveryServiceClient ¶
type MockXdsResourceDiscoveryServiceClient interface { StreamMockXdsResourceConfig(ctx context.Context, opts ...grpc.CallOption) (MockXdsResourceDiscoveryService_StreamMockXdsResourceConfigClient, error) DeltaMockXdsResourceConfig(ctx context.Context, opts ...grpc.CallOption) (MockXdsResourceDiscoveryService_DeltaMockXdsResourceConfigClient, error) FetchMockXdsResourceConfig(ctx context.Context, in *v2.DiscoveryRequest, opts ...grpc.CallOption) (*v2.DiscoveryResponse, error) }
MockXdsResourceDiscoveryServiceClient is the client API for MockXdsResourceDiscoveryService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewMockXdsResourceDiscoveryServiceClient ¶
func NewMockXdsResourceDiscoveryServiceClient(cc *grpc.ClientConn) MockXdsResourceDiscoveryServiceClient
type MockXdsResourceDiscoveryServiceServer ¶
type MockXdsResourceDiscoveryServiceServer interface { StreamMockXdsResourceConfig(MockXdsResourceDiscoveryService_StreamMockXdsResourceConfigServer) error DeltaMockXdsResourceConfig(MockXdsResourceDiscoveryService_DeltaMockXdsResourceConfigServer) error FetchMockXdsResourceConfig(context.Context, *v2.DiscoveryRequest) (*v2.DiscoveryResponse, error) }
MockXdsResourceDiscoveryServiceServer is the server API for MockXdsResourceDiscoveryService service.
func NewMockXdsResourceDiscoveryServiceServer ¶
func NewMockXdsResourceDiscoveryServiceServer(genericServer server.Server) MockXdsResourceDiscoveryServiceServer
type MockXdsResourceDiscoveryService_DeltaMockXdsResourceConfigClient ¶
type MockXdsResourceDiscoveryService_DeltaMockXdsResourceConfigClient interface { Send(*v2.DeltaDiscoveryRequest) error Recv() (*v2.DeltaDiscoveryResponse, error) grpc.ClientStream }
type MockXdsResourceDiscoveryService_DeltaMockXdsResourceConfigServer ¶
type MockXdsResourceDiscoveryService_DeltaMockXdsResourceConfigServer interface { Send(*v2.DeltaDiscoveryResponse) error Recv() (*v2.DeltaDiscoveryRequest, error) grpc.ServerStream }
type MockXdsResourceDiscoveryService_StreamMockXdsResourceConfigClient ¶
type MockXdsResourceDiscoveryService_StreamMockXdsResourceConfigClient interface { Send(*v2.DiscoveryRequest) error Recv() (*v2.DiscoveryResponse, error) grpc.ClientStream }
type MockXdsResourceDiscoveryService_StreamMockXdsResourceConfigServer ¶
type MockXdsResourceDiscoveryService_StreamMockXdsResourceConfigServer interface { Send(*v2.DiscoveryResponse) error Recv() (*v2.DiscoveryRequest, error) grpc.ServerStream }
type TestingEmitter ¶
type TestingEmitter interface { Register() error MockResource() MockResourceClient FakeResource() FakeResourceClient AnotherMockResource() AnotherMockResourceClient ClusterResource() ClusterResourceClient MockCustomType() MockCustomTypeClient Pod() github_com_solo_io_solo_kit_pkg_api_v1_resources_common_kubernetes.PodClient Snapshots(watchNamespaces []string, opts clients.WatchOpts) (<-chan *TestingSnapshot, <-chan error, error) }
func NewTestingEmitter ¶
func NewTestingEmitter(mockResourceClient MockResourceClient, fakeResourceClient FakeResourceClient, anotherMockResourceClient AnotherMockResourceClient, clusterResourceClient ClusterResourceClient, mockCustomTypeClient MockCustomTypeClient, podClient github_com_solo_io_solo_kit_pkg_api_v1_resources_common_kubernetes.PodClient) TestingEmitter
func NewTestingEmitterWithEmit ¶
func NewTestingEmitterWithEmit(mockResourceClient MockResourceClient, fakeResourceClient FakeResourceClient, anotherMockResourceClient AnotherMockResourceClient, clusterResourceClient ClusterResourceClient, mockCustomTypeClient MockCustomTypeClient, podClient github_com_solo_io_solo_kit_pkg_api_v1_resources_common_kubernetes.PodClient, emit <-chan struct{}) TestingEmitter
type TestingSimpleEmitter ¶
type TestingSimpleEmitter interface {
Snapshots(ctx context.Context) (<-chan *TestingSnapshot, <-chan error, error)
}
func NewTestingSimpleEmitter ¶
func NewTestingSimpleEmitter(aggregatedWatch clients.ResourceWatch) TestingSimpleEmitter
func NewTestingSimpleEmitterWithEmit ¶
func NewTestingSimpleEmitterWithEmit(aggregatedWatch clients.ResourceWatch, emit <-chan struct{}) TestingSimpleEmitter
type TestingSnapshot ¶
type TestingSnapshot struct { Mocks MockResourceList Fakes FakeResourceList Anothermockresources AnotherMockResourceList Clusterresources ClusterResourceList Mcts MockCustomTypeList Pods github_com_solo_io_solo_kit_pkg_api_v1_resources_common_kubernetes.PodList }
func (TestingSnapshot) Clone ¶
func (s TestingSnapshot) Clone() TestingSnapshot
func (TestingSnapshot) Hash ¶
func (s TestingSnapshot) Hash() uint64
func (TestingSnapshot) HashFields ¶
func (s TestingSnapshot) HashFields() []zap.Field
func (TestingSnapshot) Stringer ¶
func (s TestingSnapshot) Stringer() TestingSnapshotStringer
type TestingSnapshotStringer ¶
type TestingSnapshotStringer struct { Version uint64 Mocks []string Fakes []string Anothermockresources []string Clusterresources []string Mcts []string Pods []string }
func (TestingSnapshotStringer) String ¶
func (ss TestingSnapshotStringer) String() string
type TestingSyncDecider
deprecated
type TestingSyncDecider interface { TestingSyncer ShouldSync(old, new *TestingSnapshot) bool }
Deprecated: use TestingSyncDeciderWithContext
type TestingSyncDeciderWithContext ¶
type TestingSyncDeciderWithContext interface { TestingSyncer ShouldSync(ctx context.Context, old, new *TestingSnapshot) bool }
type TestingSyncer ¶
type TestingSyncer interface {
Sync(context.Context, *TestingSnapshot) error
}
type TestingSyncers ¶
type TestingSyncers []TestingSyncer
func (TestingSyncers) Sync ¶
func (s TestingSyncers) Sync(ctx context.Context, snapshot *TestingSnapshot) error
type TransitionAnotherMockResourceFunc ¶
type TransitionAnotherMockResourceFunc func(original, desired *AnotherMockResource) (bool, error)
Option to copy anything from the original to the desired before writing. Return value of false means don't update
type TransitionClusterResourceFunc ¶
type TransitionClusterResourceFunc func(original, desired *ClusterResource) (bool, error)
Option to copy anything from the original to the desired before writing. Return value of false means don't update
type TransitionFakeResourceFunc ¶
type TransitionFakeResourceFunc func(original, desired *FakeResource) (bool, error)
Option to copy anything from the original to the desired before writing. Return value of false means don't update
type TransitionMockCustomTypeFunc ¶
type TransitionMockCustomTypeFunc func(original, desired *MockCustomType) (bool, error)
Option to copy anything from the original to the desired before writing. Return value of false means don't update
type TransitionMockResourceFunc ¶
type TransitionMockResourceFunc func(original, desired *MockResource) (bool, error)
Option to copy anything from the original to the desired before writing. Return value of false means don't update
type UnimplementedMockXdsResourceDiscoveryServiceServer ¶
type UnimplementedMockXdsResourceDiscoveryServiceServer struct { }
UnimplementedMockXdsResourceDiscoveryServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedMockXdsResourceDiscoveryServiceServer) DeltaMockXdsResourceConfig ¶
func (*UnimplementedMockXdsResourceDiscoveryServiceServer) DeltaMockXdsResourceConfig(srv MockXdsResourceDiscoveryService_DeltaMockXdsResourceConfigServer) error
func (*UnimplementedMockXdsResourceDiscoveryServiceServer) FetchMockXdsResourceConfig ¶
func (*UnimplementedMockXdsResourceDiscoveryServiceServer) FetchMockXdsResourceConfig(ctx context.Context, req *v2.DiscoveryRequest) (*v2.DiscoveryResponse, error)
func (*UnimplementedMockXdsResourceDiscoveryServiceServer) StreamMockXdsResourceConfig ¶
func (*UnimplementedMockXdsResourceDiscoveryServiceServer) StreamMockXdsResourceConfig(srv MockXdsResourceDiscoveryService_StreamMockXdsResourceConfigServer) error
Source Files ¶
- another_mock_resource.sk.go
- another_mock_resource_client.sk.go
- another_mock_resource_reconciler.sk.go
- cluster_resource.sk.go
- cluster_resource_client.sk.go
- cluster_resource_reconciler.sk.go
- fake_resource.sk.go
- fake_resource_client.sk.go
- fake_resource_reconciler.sk.go
- mock_custom_type.sk.go
- mock_custom_type_client.sk.go
- mock_custom_type_reconciler.sk.go
- mock_resource.sk.go
- mock_resource_client.sk.go
- mock_resource_reconciler.sk.go
- mock_resources.pb.go
- mock_xds_resource_discovery_service_xds.sk.sk.go
- more_mock_resources.pb.go
- testing_event_loop.sk.go
- testing_simple_event_loop.sk.go
- testing_snapshot.sk.go
- testing_snapshot_emitter.sk.go
- testing_snapshot_simple_emitter.sk.go