github.com/hashicorp/packer@v1.14.3/internal/hcp/registry/null_registry.go (about)

     1  // Copyright (c) HashiCorp, Inc.
     2  // SPDX-License-Identifier: BUSL-1.1
     3  
     4  package registry
     5  
     6  import (
     7  	"context"
     8  
     9  	sdkpacker "github.com/hashicorp/packer-plugin-sdk/packer"
    10  	"github.com/hashicorp/packer/packer"
    11  )
    12  
    13  // nullRegistry is a special handler that does nothing
    14  type nullRegistry struct{}
    15  
    16  func (r nullRegistry) PopulateVersion(context.Context) error {
    17  	return nil
    18  }
    19  
    20  func (r nullRegistry) StartBuild(context.Context, *packer.CoreBuild) error {
    21  	return nil
    22  }
    23  
    24  func (r nullRegistry) CompleteBuild(
    25  	ctx context.Context,
    26  	build *packer.CoreBuild,
    27  	artifacts []sdkpacker.Artifact,
    28  	buildErr error,
    29  ) ([]sdkpacker.Artifact, error) {
    30  	return artifacts, nil
    31  }
    32  
    33  func (r nullRegistry) VersionStatusSummary() {}
    34  
    35  func (r nullRegistry) Metadata() Metadata {
    36  	return NilMetadata{}
    37  }