Documentation ¶
Index ¶
- Constants
- type Client
- type MockClient
- func (_m *MockClient) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error
- func (_m *MockClient) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error
- func (_m *MockClient) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error
- func (_m *MockClient) Get(ctx context.Context, key types.NamespacedName, obj client.Object) error
- func (_m *MockClient) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
- func (_m *MockClient) Patch(ctx context.Context, obj client.Object, patch client.Patch, ...) error
- func (_m *MockClient) RESTMapper() meta.RESTMapper
- func (_m *MockClient) Scheme() *runtime.Scheme
- func (_m *MockClient) Status() client.StatusWriter
- func (_m *MockClient) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
- type RunnerReconciler
- type RunnerReconcilerClient
- func (r *RunnerReconcilerClient) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error
- func (r *RunnerReconcilerClient) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error
- func (r *RunnerReconcilerClient) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error
- func (r *RunnerReconcilerClient) Get(ctx context.Context, key client.ObjectKey, obj client.Object) error
- func (r *RunnerReconcilerClient) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
- func (r *RunnerReconcilerClient) Patch(ctx context.Context, obj client.Object, patch client.Patch, ...) error
- func (r *RunnerReconcilerClient) RESTMapper() meta.RESTMapper
- func (r *RunnerReconcilerClient) Scheme() *runtime.Scheme
- func (r *RunnerReconcilerClient) Status() client.StatusWriter
- func (r *RunnerReconcilerClient) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
Constants ¶
const ( // RunnerRunning indicates GitLab Runner // is Running RunnerRunning string = "Running" // RunnerPending indicates initiliazing RunnerPending string = "Pending" // RunnerFailed indicates error RunnerFailed string = "Failed" // RunnerWaiting indicates waiting for secret RunnerWaiting string = "Waiting" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶ added in v1.8.0
type Client interface { Get(ctx context.Context, key client.ObjectKey, obj client.Object) error List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) error DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error Status() client.StatusWriter Scheme() *runtime.Scheme RESTMapper() meta.RESTMapper }
Client is a proxy interface, so we can generate mocks for it and use it in tests
type MockClient ¶ added in v1.8.0
MockClient is an autogenerated mock type for the Client type
func NewMockClient ¶ added in v1.15.0
func NewMockClient(t interface { mock.TestingT Cleanup(func()) }) *MockClient
NewMockClient creates a new instance of MockClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockClient) Create ¶ added in v1.8.0
func (_m *MockClient) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error
Create provides a mock function with given fields: ctx, obj, opts
func (*MockClient) Delete ¶ added in v1.8.0
func (_m *MockClient) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error
Delete provides a mock function with given fields: ctx, obj, opts
func (*MockClient) DeleteAllOf ¶ added in v1.8.0
func (_m *MockClient) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error
DeleteAllOf provides a mock function with given fields: ctx, obj, opts
func (*MockClient) Get ¶ added in v1.8.0
func (_m *MockClient) Get(ctx context.Context, key types.NamespacedName, obj client.Object) error
Get provides a mock function with given fields: ctx, key, obj
func (*MockClient) List ¶ added in v1.8.0
func (_m *MockClient) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
List provides a mock function with given fields: ctx, list, opts
func (*MockClient) Patch ¶ added in v1.8.0
func (_m *MockClient) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) error
Patch provides a mock function with given fields: ctx, obj, patch, opts
func (*MockClient) RESTMapper ¶ added in v1.8.0
func (_m *MockClient) RESTMapper() meta.RESTMapper
RESTMapper provides a mock function with given fields:
func (*MockClient) Scheme ¶ added in v1.8.0
func (_m *MockClient) Scheme() *runtime.Scheme
Scheme provides a mock function with given fields:
func (*MockClient) Status ¶ added in v1.8.0
func (_m *MockClient) Status() client.StatusWriter
Status provides a mock function with given fields:
func (*MockClient) Update ¶ added in v1.8.0
func (_m *MockClient) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
Update provides a mock function with given fields: ctx, obj, opts
type RunnerReconciler ¶
type RunnerReconciler struct { Client // DEPRECATED: Should be removed when the `registration-token` is deprecated IsAuthToken bool // contains filtered or unexported fields }
RunnerReconciler reconciles a Runner object
type RunnerReconcilerClient ¶ added in v1.8.0
type RunnerReconcilerClient struct {
// contains filtered or unexported fields
}
RunnerReconcilerClient is a proxy struct that wraps the native Client method calls
func NewRunnerReconcilerClient ¶ added in v1.8.0
func NewRunnerReconcilerClient(inner client.Client) *RunnerReconcilerClient
NewRunnerReconcilerClient creates a RunnerReconcilerClient from an already existing client.Client
func (*RunnerReconcilerClient) Create ¶ added in v1.8.0
func (r *RunnerReconcilerClient) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error
Create saves the object obj in the Kubernetes cluster.
func (*RunnerReconcilerClient) Delete ¶ added in v1.8.0
func (r *RunnerReconcilerClient) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error
Delete deletes the given obj from Kubernetes cluster.
func (*RunnerReconcilerClient) DeleteAllOf ¶ added in v1.8.0
func (r *RunnerReconcilerClient) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error
DeleteAllOf deletes all objects of the given type matching the given options.
func (*RunnerReconcilerClient) Get ¶ added in v1.8.0
func (r *RunnerReconcilerClient) Get(ctx context.Context, key client.ObjectKey, obj client.Object) error
Get retrieves an obj for the given object key from the Kubernetes Cluster. obj must be a struct pointer so that obj can be updated with the response returned by the Server.
func (*RunnerReconcilerClient) List ¶ added in v1.8.0
func (r *RunnerReconcilerClient) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
List retrieves list of objects for a given namespace and list options. On a successful call, Items field in the list will be populated with the result returned from the server.
func (*RunnerReconcilerClient) Patch ¶ added in v1.8.0
func (r *RunnerReconcilerClient) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) error
Patch patches the given obj in the Kubernetes cluster. obj must be a struct pointer so that obj can be updated with the content returned by the Server.
func (*RunnerReconcilerClient) RESTMapper ¶ added in v1.8.0
func (r *RunnerReconcilerClient) RESTMapper() meta.RESTMapper
RESTMapper returns the rest this client is using.
func (*RunnerReconcilerClient) Scheme ¶ added in v1.8.0
func (r *RunnerReconcilerClient) Scheme() *runtime.Scheme
Scheme returns the scheme this client is using.
func (*RunnerReconcilerClient) Status ¶ added in v1.8.0
func (r *RunnerReconcilerClient) Status() client.StatusWriter
Status knows how to create a client which can update status subresource for kubernetes objects.
func (*RunnerReconcilerClient) Update ¶ added in v1.8.0
func (r *RunnerReconcilerClient) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
Update updates the given obj in the Kubernetes cluster. obj must be a struct pointer so that obj can be updated with the content returned by the Server.