github.com/apptainer/singularity@v3.1.1+incompatible/internal/pkg/runtime/engines/oci/engine.go (about) 1 // Copyright (c) 2018, Sylabs Inc. All rights reserved. 2 // This software is licensed under a 3-clause BSD license. Please consult the 3 // LICENSE.md file distributed with the sources of this project regarding your 4 // rights to use or distribute this software. 5 6 package oci 7 8 import ( 9 "github.com/sylabs/singularity/internal/pkg/runtime/engines/config" 10 ) 11 12 // EngineOperations describes a runtime engine 13 type EngineOperations struct { 14 CommonConfig *config.Common `json:"-"` 15 EngineConfig *EngineConfig `json:"engineConfig"` 16 } 17 18 // InitConfig stores the pointer to config.Common 19 func (e *EngineOperations) InitConfig(cfg *config.Common) { 20 e.CommonConfig = cfg 21 } 22 23 // Config returns a pointer to a singularity.EngineConfig literal as a 24 // config.EngineConfig interface. This pointer gets stored in the Engine.Common 25 // field. 26 func (e *EngineOperations) Config() config.EngineConfig { 27 return e.EngineConfig 28 }