github.com/filecoin-project/bacalhau@v0.3.23-0.20230228154132-45c989550ace/pkg/publisher/noop/publisher.go (about)

     1  package noop
     2  
     3  import (
     4  	"context"
     5  
     6  	"github.com/filecoin-project/bacalhau/pkg/model"
     7  	"github.com/filecoin-project/bacalhau/pkg/publisher"
     8  )
     9  
    10  type NoopPublisher struct{}
    11  
    12  func NewNoopPublisher() *NoopPublisher {
    13  	return &NoopPublisher{}
    14  }
    15  
    16  func (publisher *NoopPublisher) IsInstalled(context.Context) (bool, error) {
    17  	return true, nil
    18  }
    19  
    20  func (publisher *NoopPublisher) PublishShardResult(context.Context, model.JobShard, string, string) (model.StorageSpec, error) {
    21  	return model.StorageSpec{}, nil
    22  }
    23  
    24  // Compile-time check that Publisher implements the correct interface:
    25  var _ publisher.Publisher = (*NoopPublisher)(nil)