Documentation ¶
Index ¶
- Constants
- func NewFakePodResourcesLister(path string) podresourcesapi.PodResourcesListerClient
- func ParseEndpoint(endpoint string) (string, string, error)
- type CleanupFunc
- func GetClient(endpoint string) (podresourcesapi.PodResourcesListerClient, CleanupFunc, error)
- func GetV1Client(endpoint string, connectionTimeout time.Duration, maxMsgSize int) (podresourcesapi.PodResourcesListerClient, CleanupFunc, error)
- func GetV1ClientFake(path string) (podresourcesapi.PodResourcesListerClient, CleanupFunc, error)
- func GetV1ClientUnix(path string, connectionTimeout time.Duration, maxMsgSize int) (podresourcesapi.PodResourcesListerClient, CleanupFunc, error)
- func WaitForReady(cli podresourcesapi.PodResourcesListerClient, cleanup CleanupFunc, err error) (podresourcesapi.PodResourcesListerClient, CleanupFunc, error)
- type FakeClient
- func (fc *FakeClient) Get(ctx context.Context, in *podresourcesapi.GetPodResourcesRequest, ...) (*podresourcesapi.GetPodResourcesResponse, error)
- func (fc *FakeClient) GetAllocatableResources(ctx context.Context, in *podresourcesapi.AllocatableResourcesRequest, ...) (*podresourcesapi.AllocatableResourcesResponse, error)
- func (fc *FakeClient) List(ctx context.Context, in *podresourcesapi.ListPodResourcesRequest, ...) (*podresourcesapi.ListPodResourcesResponse, error)
- type MockPodResourcesListerClient
- func (_m *MockPodResourcesListerClient) Get(ctx context.Context, in *v1.GetPodResourcesRequest, opts ...grpc.CallOption) (*v1.GetPodResourcesResponse, error)
- func (_m *MockPodResourcesListerClient) GetAllocatableResources(ctx context.Context, in *v1.AllocatableResourcesRequest, ...) (*v1.AllocatableResourcesResponse, error)
- func (_m *MockPodResourcesListerClient) List(ctx context.Context, in *v1.ListPodResourcesRequest, opts ...grpc.CallOption) (*v1.ListPodResourcesResponse, error)
- type UnsupportedProtocolError
Constants ¶
View Source
const ( DefaultTimeout = 10 * time.Second DefaultMaxMsgSize = 1024 * 1024 * 16 // 16 MiB UnixProtocol = "unix" FakeProtocol = "fake" )
Variables ¶
This section is empty.
Functions ¶
func NewFakePodResourcesLister ¶ added in v0.17.0
func NewFakePodResourcesLister(path string) podresourcesapi.PodResourcesListerClient
Types ¶
type CleanupFunc ¶ added in v0.11.100
type CleanupFunc func() error
func GetClient ¶ added in v0.11.0
func GetClient(endpoint string) (podresourcesapi.PodResourcesListerClient, CleanupFunc, error)
func GetV1Client ¶ added in v0.11.100
func GetV1Client(endpoint string, connectionTimeout time.Duration, maxMsgSize int) (podresourcesapi.PodResourcesListerClient, CleanupFunc, error)
func GetV1ClientFake ¶ added in v0.17.0
func GetV1ClientFake(path string) (podresourcesapi.PodResourcesListerClient, CleanupFunc, error)
func GetV1ClientUnix ¶ added in v0.17.0
func GetV1ClientUnix(path string, connectionTimeout time.Duration, maxMsgSize int) (podresourcesapi.PodResourcesListerClient, CleanupFunc, error)
func WaitForReady ¶ added in v0.11.100
func WaitForReady(cli podresourcesapi.PodResourcesListerClient, cleanup CleanupFunc, err error) (podresourcesapi.PodResourcesListerClient, CleanupFunc, error)
type FakeClient ¶ added in v0.17.0
type FakeClient struct {
// contains filtered or unexported fields
}
func (*FakeClient) Get ¶ added in v0.17.0
func (fc *FakeClient) Get(ctx context.Context, in *podresourcesapi.GetPodResourcesRequest, opts ...grpc.CallOption) (*podresourcesapi.GetPodResourcesResponse, error)
func (*FakeClient) GetAllocatableResources ¶ added in v0.17.0
func (fc *FakeClient) GetAllocatableResources(ctx context.Context, in *podresourcesapi.AllocatableResourcesRequest, opts ...grpc.CallOption) (*podresourcesapi.AllocatableResourcesResponse, error)
func (*FakeClient) List ¶ added in v0.17.0
func (fc *FakeClient) List(ctx context.Context, in *podresourcesapi.ListPodResourcesRequest, opts ...grpc.CallOption) (*podresourcesapi.ListPodResourcesResponse, error)
type MockPodResourcesListerClient ¶
MockPodResourcesListerClient is an autogenerated mock type for the PodResourcesListerClient type
func NewMockPodResourcesListerClient ¶ added in v0.15.0
func NewMockPodResourcesListerClient(t interface { mock.TestingT Cleanup(func()) }) *MockPodResourcesListerClient
NewMockPodResourcesListerClient creates a new instance of MockPodResourcesListerClient. 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 (*MockPodResourcesListerClient) Get ¶ added in v0.15.0
func (_m *MockPodResourcesListerClient) Get(ctx context.Context, in *v1.GetPodResourcesRequest, opts ...grpc.CallOption) (*v1.GetPodResourcesResponse, error)
Get provides a mock function with given fields: ctx, in, opts
func (*MockPodResourcesListerClient) GetAllocatableResources ¶
func (_m *MockPodResourcesListerClient) GetAllocatableResources(ctx context.Context, in *v1.AllocatableResourcesRequest, opts ...grpc.CallOption) (*v1.AllocatableResourcesResponse, error)
GetAllocatableResources provides a mock function with given fields: ctx, in, opts
func (*MockPodResourcesListerClient) List ¶
func (_m *MockPodResourcesListerClient) List(ctx context.Context, in *v1.ListPodResourcesRequest, opts ...grpc.CallOption) (*v1.ListPodResourcesResponse, error)
List provides a mock function with given fields: ctx, in, opts
type UnsupportedProtocolError ¶ added in v0.11.100
type UnsupportedProtocolError struct {
// contains filtered or unexported fields
}
func (UnsupportedProtocolError) Error ¶ added in v0.11.100
func (e UnsupportedProtocolError) Error() string
Click to show internal directories.
Click to hide internal directories.