Documentation ¶
Index ¶
- func AllowedResponse() *admissionv1.AdmissionResponse
- func DeniedResponse(reason string, args ...interface{}) *admissionv1.AdmissionResponse
- type MockInterStepBufferServices
- func (c *MockInterStepBufferServices) Create(ctx context.Context, interStepBufferService *v1alpha1.InterStepBufferService, ...) (result *v1alpha1.InterStepBufferService, err error)
- func (c *MockInterStepBufferServices) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
- func (c *MockInterStepBufferServices) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
- func (c *MockInterStepBufferServices) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.InterStepBufferService, err error)
- func (c *MockInterStepBufferServices) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.InterStepBufferServiceList, err error)
- func (c *MockInterStepBufferServices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, ...) (result *v1alpha1.InterStepBufferService, err error)
- func (c *MockInterStepBufferServices) Update(ctx context.Context, interStepBufferService *v1alpha1.InterStepBufferService, ...) (result *v1alpha1.InterStepBufferService, err error)
- func (c *MockInterStepBufferServices) UpdateStatus(ctx context.Context, interStepBufferService *v1alpha1.InterStepBufferService, ...) (*v1alpha1.InterStepBufferService, error)
- func (c *MockInterStepBufferServices) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
- type Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllowedResponse ¶
func AllowedResponse() *admissionv1.AdmissionResponse
AllowedResponse constructs an allowed AdmissionResponse
func DeniedResponse ¶
func DeniedResponse(reason string, args ...interface{}) *admissionv1.AdmissionResponse
DeniedResponse constructs a denied AdmissionResponse
Types ¶
type MockInterStepBufferServices ¶
type MockInterStepBufferServices struct {
Fake *fake.FakeNumaflowV1alpha1
}
MockInterStepBufferServices implements InterStepBufferServiceInterface NOTE: This is used as a mock for testing purposes only
func (*MockInterStepBufferServices) Create ¶
func (c *MockInterStepBufferServices) Create(ctx context.Context, interStepBufferService *v1alpha1.InterStepBufferService, opts v1.CreateOptions) (result *v1alpha1.InterStepBufferService, err error)
Create takes the representation of a interStepBufferService and creates it. Returns the server's representation of the interStepBufferService, and an error, if there is any.
func (*MockInterStepBufferServices) Delete ¶
func (c *MockInterStepBufferServices) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
Delete takes name of the interStepBufferService and deletes it. Returns an error if one occurs.
func (*MockInterStepBufferServices) DeleteCollection ¶
func (c *MockInterStepBufferServices) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
DeleteCollection deletes a collection of objects.
func (*MockInterStepBufferServices) Get ¶
func (c *MockInterStepBufferServices) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.InterStepBufferService, err error)
Get takes name of the interStepBufferService, and returns the corresponding interStepBufferService object, and an error if there is any.
func (*MockInterStepBufferServices) List ¶
func (c *MockInterStepBufferServices) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.InterStepBufferServiceList, err error)
List takes label and field selectors, and returns the list of InterStepBufferServices that match those selectors.
func (*MockInterStepBufferServices) Patch ¶
func (c *MockInterStepBufferServices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.InterStepBufferService, err error)
Patch applies the patch and returns the patched interStepBufferService.
func (*MockInterStepBufferServices) Update ¶
func (c *MockInterStepBufferServices) Update(ctx context.Context, interStepBufferService *v1alpha1.InterStepBufferService, opts v1.UpdateOptions) (result *v1alpha1.InterStepBufferService, err error)
Update takes the representation of a interStepBufferService and updates it. Returns the server's representation of the interStepBufferService, and an error, if there is any.
func (*MockInterStepBufferServices) UpdateStatus ¶
func (c *MockInterStepBufferServices) UpdateStatus(ctx context.Context, interStepBufferService *v1alpha1.InterStepBufferService, opts v1.UpdateOptions) (*v1alpha1.InterStepBufferService, error)
UpdateStatus was generated because the type contains a Status member. Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (*MockInterStepBufferServices) Watch ¶
func (c *MockInterStepBufferServices) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Watch returns a watch.Interface that watches the requested interStepBufferServices.
type Validator ¶
type Validator interface { ValidateCreate(context.Context) *admissionv1.AdmissionResponse ValidateUpdate(context.Context) *admissionv1.AdmissionResponse }
func GetValidator ¶
func GetValidator(ctx context.Context, NumaClient v1alpha1.NumaflowV1alpha1Interface, kind metav1.GroupVersionKind, oldBytes []byte, newBytes []byte) (Validator, error)
GetValidator returns a Validator instance
func NewISBServiceValidator ¶
func NewISBServiceValidator(old, new *dfv1.InterStepBufferService) Validator
func NewPipelineValidator ¶
func NewPipelineValidator(isbClient v1alpha1.InterStepBufferServiceInterface, old, new *dfv1.Pipeline) Validator
NewPipelineValidator returns a new PipelineValidator