Skip to content

move internal/computecore out of internal#2825

Open
AkihiroSuda wants to merge 1 commit into
microsoft:mainfrom
AkihiroSuda:expose-vmcompute
Open

move internal/computecore out of internal#2825
AkihiroSuda wants to merge 1 commit into
microsoft:mainfrom
AkihiroSuda:expose-vmcompute

Conversation

@AkihiroSuda

@AkihiroSuda AkihiroSuda commented Jul 14, 2026

Copy link
Copy Markdown

Part of:

godoc

package computecore // import "github.com/Microsoft/hcsshim/pkg/computecore"


CONSTANTS

const (
	HcsResourceTypeNone      uint32 = 0
	HcsResourceTypeFile      uint32 = 1
	HcsResourceTypeJob       uint32 = 2
	HcsResourceTypeComObject uint32 = 3
	HcsResourceTypeSocket    uint32 = 4
)
    HcsResourceType specifies the type of resource to add to an operation.

const (
	HcsEventOptionNone                      uint32 = 0
	HcsEventOptionEnableOperationCallbacks  uint32 = 1
	HcsEventOptionEnableLiveMigrationEvents uint32 = 4
)
    HcsEventOptions controls which event groups are enabled for a callback.


FUNCTIONS

func HcsAddResourceToOperation(ctx gcontext.Context, operation HcsOperation, resourceType uint32, uri string, handle syscall.Handle) (hr error)
func HcsCancelOperation(ctx gcontext.Context, operation HcsOperation) (hr error)
func HcsCloseComputeSystem(ctx gcontext.Context, computeSystem HcsSystem)
func HcsCloseOperation(ctx gcontext.Context, operation HcsOperation)
func HcsCloseProcess(ctx gcontext.Context, process HcsProcess)
func HcsCrashComputeSystem(ctx gcontext.Context, computeSystem HcsSystem, operation HcsOperation, options string) (hr error)
func HcsCreateComputeSystem(ctx gcontext.Context, id string, configuration string, operation HcsOperation, securityDescriptor unsafe.Pointer) (computeSystem HcsSystem, hr error)
func HcsCreateComputeSystemInNamespace(ctx gcontext.Context, idNamespace string, id string, configuration string, operation HcsOperation, options unsafe.Pointer) (computeSystem HcsSystem, hr error)
func HcsCreateEmptyGuestStateFile(ctx gcontext.Context, guestStateFilePath string) (hr error)
func HcsCreateEmptyRuntimeStateFile(ctx gcontext.Context, runtimeStateFilePath string) (hr error)
func HcsCreateOperation(ctx gcontext.Context, callbackContext uintptr, callback uintptr) (operation HcsOperation, hr error)
func HcsCreateOperationWithNotifications(ctx gcontext.Context, eventTypes uint32, callbackContext uintptr, callback uintptr) (operation HcsOperation, hr error)
func HcsCreateProcess(ctx gcontext.Context, computeSystem HcsSystem, processParameters string, operation HcsOperation, securityDescriptor unsafe.Pointer) (process HcsProcess, hr error)
func HcsEnumerateComputeSystems(ctx gcontext.Context, query string, operation HcsOperation) (hr error)
func HcsEnumerateComputeSystemsInNamespace(ctx gcontext.Context, idNamespace string, query string, operation HcsOperation) (hr error)
func HcsFinalizeLiveMigration(ctx gcontext.Context, computeSystem HcsSystem, operation HcsOperation, options string) (hr error)
func HcsGetComputeSystemProperties(ctx gcontext.Context, computeSystem HcsSystem, operation HcsOperation, propertyQuery string) (hr error)
func HcsGetOperationContext(ctx gcontext.Context, operation HcsOperation) uintptr
func HcsGetOperationID(ctx gcontext.Context, operation HcsOperation) uint64
func HcsGetOperationProperties(ctx gcontext.Context, operation HcsOperation, options string) (resultDocument string, hr error)
func HcsGetOperationResult(ctx gcontext.Context, operation HcsOperation) (resultDocument string, hr error)
func HcsGetOperationResultAndProcessInfo(ctx gcontext.Context, operation HcsOperation) (processInformation HcsProcessInformation, resultDocument string, hr error)
func HcsGetOperationType(ctx gcontext.Context, operation HcsOperation) int32
func HcsGetProcessInfo(ctx gcontext.Context, process HcsProcess, operation HcsOperation) (hr error)
func HcsGetProcessProperties(ctx gcontext.Context, process HcsProcess, operation HcsOperation, propertyQuery string) (hr error)
func HcsGetProcessorCompatibilityFromSavedState(ctx gcontext.Context, runtimeFileName string) (processorFeaturesString string, hr error)
func HcsGetServiceProperties(ctx gcontext.Context, propertyQuery string) (result string, hr error)
func HcsGrantVMAccess(ctx gcontext.Context, vmID string, filePath string) (hr error)
func HcsGrantVMGroupAccess(ctx gcontext.Context, filePath string) (hr error)
func HcsInitializeLiveMigrationOnSource(ctx gcontext.Context, computeSystem HcsSystem, operation HcsOperation, options string) (hr error)
func HcsModifyComputeSystem(ctx gcontext.Context, computeSystem HcsSystem, operation HcsOperation, configuration string, identity syscall.Handle) (hr error)
func HcsModifyProcess(ctx gcontext.Context, process HcsProcess, operation HcsOperation, settings string) (hr error)
func HcsModifyServiceSettings(ctx gcontext.Context, settings string) (result string, hr error)
func HcsOpenComputeSystem(ctx gcontext.Context, id string, requestedAccess uint32) (computeSystem HcsSystem, hr error)
func HcsOpenComputeSystemInNamespace(ctx gcontext.Context, idNamespace string, id string, requestedAccess uint32) (computeSystem HcsSystem, hr error)
func HcsOpenProcess(ctx gcontext.Context, computeSystem HcsSystem, pid uint32, requestedAccess uint32) (process HcsProcess, hr error)
func HcsPauseComputeSystem(ctx gcontext.Context, computeSystem HcsSystem, operation HcsOperation, options string) (hr error)
func HcsResumeComputeSystem(ctx gcontext.Context, computeSystem HcsSystem, operation HcsOperation, options string) (hr error)
func HcsRevokeVMAccess(ctx gcontext.Context, vmID string, filePath string) (hr error)
func HcsRevokeVMGroupAccess(ctx gcontext.Context, filePath string) (hr error)
func HcsSaveComputeSystem(ctx gcontext.Context, computeSystem HcsSystem, operation HcsOperation, options string) (hr error)
func HcsSetComputeSystemCallback(ctx gcontext.Context, computeSystem HcsSystem, callbackOptions uint32, callbackContext uintptr, callback uintptr) (hr error)
func HcsSetOperationCallback(ctx gcontext.Context, operation HcsOperation, callbackContext uintptr, callback uintptr) (hr error)
func HcsSetOperationContext(ctx gcontext.Context, operation HcsOperation, callbackContext uintptr) (hr error)
func HcsSetProcessCallback(ctx gcontext.Context, process HcsProcess, callbackOptions uint32, callbackContext uintptr, callback uintptr) (hr error)
func HcsShutDownComputeSystem(ctx gcontext.Context, computeSystem HcsSystem, operation HcsOperation, options string) (hr error)
func HcsSignalProcess(ctx gcontext.Context, process HcsProcess, operation HcsOperation, options string) (hr error)
func HcsStartComputeSystem(ctx gcontext.Context, computeSystem HcsSystem, operation HcsOperation, options string) (hr error)
func HcsStartLiveMigrationOnSource(ctx gcontext.Context, computeSystem HcsSystem, operation HcsOperation, options string) (hr error)
func HcsStartLiveMigrationTransfer(ctx gcontext.Context, computeSystem HcsSystem, operation HcsOperation, options string) (hr error)
func HcsSubmitWerReport(ctx gcontext.Context, settings string) (hr error)
func HcsTerminateComputeSystem(ctx gcontext.Context, computeSystem HcsSystem, operation HcsOperation, options string) (hr error)
func HcsTerminateProcess(ctx gcontext.Context, process HcsProcess, operation HcsOperation, options string) (hr error)
func HcsWaitForComputeSystemExit(ctx gcontext.Context, computeSystem HcsSystem, timeoutMs uint32) (result string, hr error)
func HcsWaitForOperationResult(ctx gcontext.Context, operation HcsOperation, timeoutMs uint32) (resultDocument string, hr error)
func HcsWaitForOperationResultAndProcessInfo(ctx gcontext.Context, operation HcsOperation, timeoutMs uint32) (processInformation HcsProcessInformation, resultDocument string, hr error)
func HcsWaitForProcessExit(ctx gcontext.Context, process HcsProcess, timeoutMs uint32) (result string, hr error)

TYPES

type HcsCallback syscall.Handle
    HcsCallback is the handle associated with the function to call when events
    occur.

type HcsEvent struct {
	Type      HcsEventType
	EventData *uint16
}
    HcsEvent is the event structure passed to HCS_EVENT_CALLBACK.

type HcsEventType uint32
    HcsEventType represents the type of event received from HCS.

const (
	HcsEventTypeInvalid                           HcsEventType = 0x00000000
	HcsEventTypeSystemExited                      HcsEventType = 0x00000001
	HcsEventTypeSystemCrashInitiated              HcsEventType = 0x00000002
	HcsEventTypeSystemCrashReport                 HcsEventType = 0x00000003
	HcsEventTypeSystemRdpEnhancedModeStateChanged HcsEventType = 0x00000004
	HcsEventTypeSystemSiloJobCreated              HcsEventType = 0x00000005
	HcsEventTypeSystemGuestConnectionClosed       HcsEventType = 0x00000006
	HcsEventTypeProcessExited                     HcsEventType = 0x00010000
	HcsEventTypeOperationCallback                 HcsEventType = 0x01000000
	HcsEventTypeServiceDisconnect                 HcsEventType = 0x02000000
	HcsEventTypeGroupVMLifecycle                  HcsEventType = 0x80000002
	HcsEventTypeGroupLiveMigration                HcsEventType = 0x80000003
	HcsEventTypeGroupOperationInfo                HcsEventType = 0xC0000001
)
func (t HcsEventType) String() string

type HcsOperation syscall.Handle
    HcsOperation is the handle associated with an operation on a compute system.

type HcsProcess syscall.Handle
    HcsProcess is the handle associated with a created process in a compute
    system.

func HcsGetProcessFromOperation(ctx gcontext.Context, operation HcsOperation) HcsProcess

type HcsProcessInformation struct {
	ProcessID uint32

	StdInput  syscall.Handle
	StdOutput syscall.Handle
	StdError  syscall.Handle
	// Has unexported fields.
}
    HcsProcessInformation is the structure used when creating or getting process
    info.

type HcsSystem syscall.Handle
    HcsSystem is the handle associated with a created compute system.

func HcsGetComputeSystemFromOperation(ctx gcontext.Context, operation HcsOperation) HcsSystem

@AkihiroSuda AkihiroSuda requested a review from a team as a code owner July 14, 2026 09:40
@AkihiroSuda

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

Part of issue 2823

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
@AkihiroSuda AkihiroSuda changed the title move internal/vmcompute out of internal move internal/computecore out of internal Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant