Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ReplicateService ¶
type ReplicateService interface { // Snap will be used to export resources from target cluster. Snap(ctx context.Context, opts ...snapshot.Option) (*snapshot.ResourcesForSnap, error) // Load will be used to import resources the from data which was exported. Load(ctx context.Context, resources *snapshot.ResourcesForLoad, opts ...snapshot.Option) error IgnoreErr() snapshot.Option IgnoreSchedulerConfiguration() snapshot.Option }
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service has two ReplicateServices. importService is used to import(replicate) these resources to the simulator. exportService is used to export resources from a target cluster.
func NewService ¶
func NewService(e ReplicateService, i ReplicateService) *Service
NewService initializes Service.
func (*Service) ImportClusterResources ¶
ImportClusterResources gets resources from the target cluster via exportService and then apply those resources to the simulator. Note: this method doesn't handle scheduler configuration. If you want to use the scheduler configuration along with the imported resources on the simulator, you need to set the path of the scheduler configuration file to `kubeSchedulerConfigPath` value in the Simulator Server Configuration.
Directories ¶
Path | Synopsis |
---|---|
Package mock_clusterresourceimporter is a generated GoMock package.
|
Package mock_clusterresourceimporter is a generated GoMock package. |