Documentation ¶
Overview ¶
Package kubernetes is a generated GoMock package.
Index ¶
- Variables
- func EnsureNamespace(ctx context.Context, client k8s.Interface, namespace string) error
- func GetContextFromConfigFileIfExists(configFilePath, context string) (string, error)
- func NewCLIClientConfig(context string) (*rest.Config, error)
- func NewClientset(context string) (*k8s.Clientset, *rest.Config, error)
- func NewDynamicClient(context string) (dynamic.Interface, error)
- func NewRuntimeClient(context string, scheme *k8s_runtime.Scheme) (client.WithWatch, error)
- type Impl
- type Interface
- type MockInterface
- type MockInterfaceDeleteNamespaceCall
- func (c *MockInterfaceDeleteNamespaceCall) Do(f func(string) error) *MockInterfaceDeleteNamespaceCall
- func (c *MockInterfaceDeleteNamespaceCall) DoAndReturn(f func(string) error) *MockInterfaceDeleteNamespaceCall
- func (c *MockInterfaceDeleteNamespaceCall) Return(arg0 error) *MockInterfaceDeleteNamespaceCall
- type MockInterfaceGetKubeContextCall
- func (c *MockInterfaceGetKubeContextCall) Do(f func() (*api.Config, error)) *MockInterfaceGetKubeContextCall
- func (c *MockInterfaceGetKubeContextCall) DoAndReturn(f func() (*api.Config, error)) *MockInterfaceGetKubeContextCall
- func (c *MockInterfaceGetKubeContextCall) Return(arg0 *api.Config, arg1 error) *MockInterfaceGetKubeContextCall
- type MockInterfaceMockRecorder
Constants ¶
This section is empty.
Variables ¶
var (
Scheme = k8s_runtime.NewScheme()
)
Functions ¶
func EnsureNamespace ¶
EnsureNamespace checks if a namespace exists in a Kubernetes cluster and creates it if it doesn't, returning an error if it fails.
func GetContextFromConfigFileIfExists ¶
GetContextFromConfigFileIfExists attempts to load a Kubernetes context from a config file, and returns an error if the context is not found.
func NewCLIClientConfig ¶
NewCLIClientConfig creates a new Kubernetes client config from the local configuration file using the given context name, with a default QPS and Burst. It returns a rest.Config and an error if one occurs.
func NewClientset ¶
NewClientset creates a new Kubernetes client and rest client config by context name.
func NewDynamicClient ¶
NewDynamicClient creates a new dynamic client by context name, otherwise returns an error.
func NewRuntimeClient ¶
NewRuntimeClient creates a kubernetes client using a given context and scheme.
Types ¶
type MockInterface ¶
type MockInterface struct {
// contains filtered or unexported fields
}
MockInterface is a mock of Interface interface.
func NewMockInterface ¶
func NewMockInterface(ctrl *gomock.Controller) *MockInterface
NewMockInterface creates a new mock instance.
func (*MockInterface) DeleteNamespace ¶ added in v0.38.0
func (m *MockInterface) DeleteNamespace(arg0 string) error
DeleteNamespace mocks base method.
func (*MockInterface) EXPECT ¶
func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockInterface) GetKubeContext ¶
func (m *MockInterface) GetKubeContext() (*api.Config, error)
GetKubeContext mocks base method.
type MockInterfaceDeleteNamespaceCall ¶ added in v0.38.0
MockInterfaceDeleteNamespaceCall wrap *gomock.Call
func (*MockInterfaceDeleteNamespaceCall) Do ¶ added in v0.38.0
func (c *MockInterfaceDeleteNamespaceCall) Do(f func(string) error) *MockInterfaceDeleteNamespaceCall
Do rewrite *gomock.Call.Do
func (*MockInterfaceDeleteNamespaceCall) DoAndReturn ¶ added in v0.38.0
func (c *MockInterfaceDeleteNamespaceCall) DoAndReturn(f func(string) error) *MockInterfaceDeleteNamespaceCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockInterfaceDeleteNamespaceCall) Return ¶ added in v0.38.0
func (c *MockInterfaceDeleteNamespaceCall) Return(arg0 error) *MockInterfaceDeleteNamespaceCall
Return rewrite *gomock.Call.Return
type MockInterfaceGetKubeContextCall ¶ added in v0.35.0
MockInterfaceGetKubeContextCall wrap *gomock.Call
func (*MockInterfaceGetKubeContextCall) Do ¶ added in v0.35.0
func (c *MockInterfaceGetKubeContextCall) Do(f func() (*api.Config, error)) *MockInterfaceGetKubeContextCall
Do rewrite *gomock.Call.Do
func (*MockInterfaceGetKubeContextCall) DoAndReturn ¶ added in v0.35.0
func (c *MockInterfaceGetKubeContextCall) DoAndReturn(f func() (*api.Config, error)) *MockInterfaceGetKubeContextCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockInterfaceGetKubeContextCall) Return ¶ added in v0.35.0
func (c *MockInterfaceGetKubeContextCall) Return(arg0 *api.Config, arg1 error) *MockInterfaceGetKubeContextCall
Return rewrite *gomock.Call.Return
type MockInterfaceMockRecorder ¶
type MockInterfaceMockRecorder struct {
// contains filtered or unexported fields
}
MockInterfaceMockRecorder is the mock recorder for MockInterface.
func (*MockInterfaceMockRecorder) DeleteNamespace ¶ added in v0.38.0
func (mr *MockInterfaceMockRecorder) DeleteNamespace(arg0 any) *MockInterfaceDeleteNamespaceCall
DeleteNamespace indicates an expected call of DeleteNamespace.
func (*MockInterfaceMockRecorder) GetKubeContext ¶
func (mr *MockInterfaceMockRecorder) GetKubeContext() *MockInterfaceGetKubeContextCall
GetKubeContext indicates an expected call of GetKubeContext.
Directories ¶
Path | Synopsis |
---|---|
logstream contains functionality for streaming logs for an entire application from Kubernetes.
|
logstream contains functionality for streaming logs for an entire application from Kubernetes. |
portforward contains functionality for port-forwarding an entire application from Kubernetes.
|
portforward contains functionality for port-forwarding an entire application from Kubernetes. |