Documentation ¶
Overview ¶
Package yunikorn is a generated GoMock package.
Index ¶
- type Client
- type EventHandler
- type MockClient
- func (m *MockClient) EXPECT() *MockClientMockRecorder
- func (m *MockClient) GetApplication(arg0 context.Context, arg1, arg2, arg3 string) (*dao.ApplicationDAOInfo, error)
- func (m *MockClient) GetApplications(arg0 context.Context, arg1, arg2 string) ([]*dao.ApplicationDAOInfo, error)
- func (m *MockClient) GetAppsHistory(arg0 context.Context) ([]*dao.ApplicationHistoryDAOInfo, error)
- func (m *MockClient) GetContainersHistory(arg0 context.Context) ([]*dao.ContainerHistoryDAOInfo, error)
- func (m *MockClient) GetEventStream(arg0 context.Context) (*http.Response, error)
- func (m *MockClient) GetNodeUtil(arg0 context.Context) ([]*dao.PartitionNodesUtilDAOInfo, error)
- func (m *MockClient) GetPartitionNodes(arg0 context.Context, arg1 string) ([]*dao.NodeDAOInfo, error)
- func (m *MockClient) GetPartitionQueues(arg0 context.Context, arg1 string) (*dao.PartitionQueueDAOInfo, error)
- func (m *MockClient) GetPartitions(arg0 context.Context) ([]*dao.PartitionInfo, error)
- func (m *MockClient) Healthcheck(arg0 context.Context) (*dao.SchedulerHealthDAOInfo, error)
- type MockClientMockRecorder
- func (mr *MockClientMockRecorder) GetApplication(arg0, arg1, arg2, arg3 any) *gomock.Call
- func (mr *MockClientMockRecorder) GetApplications(arg0, arg1, arg2 any) *gomock.Call
- func (mr *MockClientMockRecorder) GetAppsHistory(arg0 any) *gomock.Call
- func (mr *MockClientMockRecorder) GetContainersHistory(arg0 any) *gomock.Call
- func (mr *MockClientMockRecorder) GetEventStream(arg0 any) *gomock.Call
- func (mr *MockClientMockRecorder) GetNodeUtil(arg0 any) *gomock.Call
- func (mr *MockClientMockRecorder) GetPartitionNodes(arg0, arg1 any) *gomock.Call
- func (mr *MockClientMockRecorder) GetPartitionQueues(arg0, arg1 any) *gomock.Call
- func (mr *MockClientMockRecorder) GetPartitions(arg0 any) *gomock.Call
- func (mr *MockClientMockRecorder) Healthcheck(arg0 any) *gomock.Call
- type Option
- type RESTClient
- func (c *RESTClient) GetApplication(ctx context.Context, partitionName, queueName, appID string) (*dao.ApplicationDAOInfo, error)
- func (c *RESTClient) GetApplications(ctx context.Context, partitionName, queueName string) ([]*dao.ApplicationDAOInfo, error)
- func (c *RESTClient) GetAppsHistory(ctx context.Context) ([]*dao.ApplicationHistoryDAOInfo, error)
- func (c *RESTClient) GetContainersHistory(ctx context.Context) ([]*dao.ContainerHistoryDAOInfo, error)
- func (c *RESTClient) GetEventStream(ctx context.Context) (*http.Response, error)
- func (c *RESTClient) GetNodeUtil(ctx context.Context) ([]*dao.PartitionNodesUtilDAOInfo, error)
- func (c *RESTClient) GetPartitionNodes(ctx context.Context, partitionName string) ([]*dao.NodeDAOInfo, error)
- func (c *RESTClient) GetPartitionQueues(ctx context.Context, partitionName string) (*dao.PartitionQueueDAOInfo, error)
- func (c *RESTClient) GetPartitions(ctx context.Context) ([]*dao.PartitionInfo, error)
- func (c *RESTClient) Healthcheck(ctx context.Context) (*dao.SchedulerHealthDAOInfo, error)
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { GetPartitions(ctx context.Context) ([]*dao.PartitionInfo, error) GetPartitionQueues(ctx context.Context, partitionName string) (*dao.PartitionQueueDAOInfo, error) GetApplications(ctx context.Context, partitionName, queueName string) ([]*dao.ApplicationDAOInfo, error) GetApplication(ctx context.Context, partitionName, queueName, appID string) (*dao.ApplicationDAOInfo, error) GetPartitionNodes(ctx context.Context, partitionName string) ([]*dao.NodeDAOInfo, error) GetNodeUtil(ctx context.Context) ([]*dao.PartitionNodesUtilDAOInfo, error) GetAppsHistory(ctx context.Context) ([]*dao.ApplicationHistoryDAOInfo, error) GetContainersHistory(ctx context.Context) ([]*dao.ContainerHistoryDAOInfo, error) GetEventStream(ctx context.Context) (*http.Response, error) Healthcheck(ctx context.Context) (*dao.SchedulerHealthDAOInfo, error) }
Client defines the interface for interacting with the Yunikorn REST API.
type EventHandler ¶
type EventHandler func(context.Context, *si.EventRecord) error
type MockClient ¶
type MockClient struct {
// contains filtered or unexported fields
}
MockClient is a mock of Client interface.
func NewMockClient ¶
func NewMockClient(ctrl *gomock.Controller) *MockClient
NewMockClient creates a new mock instance.
func (*MockClient) EXPECT ¶
func (m *MockClient) EXPECT() *MockClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockClient) GetApplication ¶
func (m *MockClient) GetApplication(arg0 context.Context, arg1, arg2, arg3 string) (*dao.ApplicationDAOInfo, error)
GetApplication mocks base method.
func (*MockClient) GetApplications ¶
func (m *MockClient) GetApplications(arg0 context.Context, arg1, arg2 string) ([]*dao.ApplicationDAOInfo, error)
GetApplications mocks base method.
func (*MockClient) GetAppsHistory ¶
func (m *MockClient) GetAppsHistory(arg0 context.Context) ([]*dao.ApplicationHistoryDAOInfo, error)
GetAppsHistory mocks base method.
func (*MockClient) GetContainersHistory ¶
func (m *MockClient) GetContainersHistory(arg0 context.Context) ([]*dao.ContainerHistoryDAOInfo, error)
GetContainersHistory mocks base method.
func (*MockClient) GetEventStream ¶
GetEventStream mocks base method.
func (*MockClient) GetNodeUtil ¶
func (m *MockClient) GetNodeUtil(arg0 context.Context) ([]*dao.PartitionNodesUtilDAOInfo, error)
GetNodeUtil mocks base method.
func (*MockClient) GetPartitionNodes ¶
func (m *MockClient) GetPartitionNodes(arg0 context.Context, arg1 string) ([]*dao.NodeDAOInfo, error)
GetPartitionNodes mocks base method.
func (*MockClient) GetPartitionQueues ¶
func (m *MockClient) GetPartitionQueues(arg0 context.Context, arg1 string) (*dao.PartitionQueueDAOInfo, error)
GetPartitionQueues mocks base method.
func (*MockClient) GetPartitions ¶
func (m *MockClient) GetPartitions(arg0 context.Context) ([]*dao.PartitionInfo, error)
GetPartitions mocks base method.
func (*MockClient) Healthcheck ¶
func (m *MockClient) Healthcheck(arg0 context.Context) (*dao.SchedulerHealthDAOInfo, error)
Healthcheck mocks base method.
type MockClientMockRecorder ¶
type MockClientMockRecorder struct {
// contains filtered or unexported fields
}
MockClientMockRecorder is the mock recorder for MockClient.
func (*MockClientMockRecorder) GetApplication ¶
func (mr *MockClientMockRecorder) GetApplication(arg0, arg1, arg2, arg3 any) *gomock.Call
GetApplication indicates an expected call of GetApplication.
func (*MockClientMockRecorder) GetApplications ¶
func (mr *MockClientMockRecorder) GetApplications(arg0, arg1, arg2 any) *gomock.Call
GetApplications indicates an expected call of GetApplications.
func (*MockClientMockRecorder) GetAppsHistory ¶
func (mr *MockClientMockRecorder) GetAppsHistory(arg0 any) *gomock.Call
GetAppsHistory indicates an expected call of GetAppsHistory.
func (*MockClientMockRecorder) GetContainersHistory ¶
func (mr *MockClientMockRecorder) GetContainersHistory(arg0 any) *gomock.Call
GetContainersHistory indicates an expected call of GetContainersHistory.
func (*MockClientMockRecorder) GetEventStream ¶
func (mr *MockClientMockRecorder) GetEventStream(arg0 any) *gomock.Call
GetEventStream indicates an expected call of GetEventStream.
func (*MockClientMockRecorder) GetNodeUtil ¶
func (mr *MockClientMockRecorder) GetNodeUtil(arg0 any) *gomock.Call
GetNodeUtil indicates an expected call of GetNodeUtil.
func (*MockClientMockRecorder) GetPartitionNodes ¶
func (mr *MockClientMockRecorder) GetPartitionNodes(arg0, arg1 any) *gomock.Call
GetPartitionNodes indicates an expected call of GetPartitionNodes.
func (*MockClientMockRecorder) GetPartitionQueues ¶
func (mr *MockClientMockRecorder) GetPartitionQueues(arg0, arg1 any) *gomock.Call
GetPartitionQueues indicates an expected call of GetPartitionQueues.
func (*MockClientMockRecorder) GetPartitions ¶
func (mr *MockClientMockRecorder) GetPartitions(arg0 any) *gomock.Call
GetPartitions indicates an expected call of GetPartitions.
func (*MockClientMockRecorder) Healthcheck ¶
func (mr *MockClientMockRecorder) Healthcheck(arg0 any) *gomock.Call
Healthcheck indicates an expected call of Healthcheck.
type RESTClient ¶
type RESTClient struct {
// contains filtered or unexported fields
}
RESTClient implements the Client interface which defines functions to interact with the Yunikorn REST API
func NewRESTClient ¶
func NewRESTClient(cfg *config.YunikornConfig) *RESTClient
func (*RESTClient) GetApplication ¶
func (c *RESTClient) GetApplication( ctx context.Context, partitionName, queueName, appID string, ) (*dao.ApplicationDAOInfo, error)
GetApplication calls the Yunikorn Scheduler API to get the application information for the given partition, queue and appID. If partitionName is empty, it defaults to "default". If queueName is empty, it gets the application from the partition level
func (*RESTClient) GetApplications ¶
func (c *RESTClient) GetApplications(ctx context.Context, partitionName, queueName string) ( []*dao.ApplicationDAOInfo, error)
func (*RESTClient) GetAppsHistory ¶
func (c *RESTClient) GetAppsHistory(ctx context.Context) ([]*dao.ApplicationHistoryDAOInfo, error)
func (*RESTClient) GetContainersHistory ¶
func (c *RESTClient) GetContainersHistory(ctx context.Context) ([]*dao.ContainerHistoryDAOInfo, error)
func (*RESTClient) GetEventStream ¶
func (*RESTClient) GetNodeUtil ¶
func (c *RESTClient) GetNodeUtil(ctx context.Context) ([]*dao.PartitionNodesUtilDAOInfo, error)
func (*RESTClient) GetPartitionNodes ¶
func (c *RESTClient) GetPartitionNodes(ctx context.Context, partitionName string) ([]*dao.NodeDAOInfo, error)
func (*RESTClient) GetPartitionQueues ¶
func (c *RESTClient) GetPartitionQueues(ctx context.Context, partitionName string) (*dao.PartitionQueueDAOInfo, error)
func (*RESTClient) GetPartitions ¶
func (c *RESTClient) GetPartitions(ctx context.Context) ([]*dao.PartitionInfo, error)
func (*RESTClient) Healthcheck ¶
func (c *RESTClient) Healthcheck(ctx context.Context) (*dao.SchedulerHealthDAOInfo, error)
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(repository repository.Repository, eventRepository repository.EventRepository, client Client, opts ...Option) *Service