github.com/skippbox/kompose-origin@v0.0.0-20160524133224-16a9dca7bac2/project/empty.go (about)

     1  package project
     2  
     3  import (
     4  	"golang.org/x/net/context"
     5  
     6  	"github.com/docker/libcompose/project/options"
     7  )
     8  
     9  // EmptyService is a struct that implements Service but does nothing.
    10  type EmptyService struct {
    11  }
    12  
    13  // Create implements Service.Create but does nothing.
    14  func (e *EmptyService) Create(ctx context.Context, options options.Create) error {
    15  	return nil
    16  }
    17  
    18  // Build implements Service.Build but does nothing.
    19  func (e *EmptyService) Build(ctx context.Context, buildOptions options.Build) error {
    20  	return nil
    21  }
    22  
    23  // Up implements Service.Up but does nothing.
    24  func (e *EmptyService) Up(ctx context.Context, options options.Up) error {
    25  	return nil
    26  }
    27  
    28  // Start implements Service.Start but does nothing.
    29  func (e *EmptyService) Start(ctx context.Context) error {
    30  	return nil
    31  }
    32  
    33  // Stop implements Service.Stop() but does nothing.
    34  func (e *EmptyService) Stop(ctx context.Context, timeout int) error {
    35  	return nil
    36  }
    37  
    38  // Delete implements Service.Delete but does nothing.
    39  func (e *EmptyService) Delete(ctx context.Context, options options.Delete) error {
    40  	return nil
    41  }
    42  
    43  // Restart implements Service.Restart but does nothing.
    44  func (e *EmptyService) Restart(ctx context.Context, timeout int) error {
    45  	return nil
    46  }
    47  
    48  // Log implements Service.Log but does nothing.
    49  func (e *EmptyService) Log(ctx context.Context, follow bool) error {
    50  	return nil
    51  }
    52  
    53  // Pull implements Service.Pull but does nothing.
    54  func (e *EmptyService) Pull(ctx context.Context) error {
    55  	return nil
    56  }
    57  
    58  // Kill implements Service.Kill but does nothing.
    59  func (e *EmptyService) Kill(ctx context.Context, signal string) error {
    60  	return nil
    61  }
    62  
    63  // Containers implements Service.Containers but does nothing.
    64  func (e *EmptyService) Containers(ctx context.Context) ([]Container, error) {
    65  	return []Container{}, nil
    66  }
    67  
    68  // Scale implements Service.Scale but does nothing.
    69  func (e *EmptyService) Scale(ctx context.Context, count int, timeout int) error {
    70  	return nil
    71  }
    72  
    73  // Info implements Service.Info but does nothing.
    74  func (e *EmptyService) Info(ctx context.Context, qFlag bool) (InfoSet, error) {
    75  	return InfoSet{}, nil
    76  }
    77  
    78  // Pause implements Service.Pause but does nothing.
    79  func (e *EmptyService) Pause(ctx context.Context) error {
    80  	return nil
    81  }
    82  
    83  // Unpause implements Service.Pause but does nothing.
    84  func (e *EmptyService) Unpause(ctx context.Context) error {
    85  	return nil
    86  }
    87  
    88  // Run implements Service.Run but does nothing.
    89  func (e *EmptyService) Run(ctx context.Context, commandParts []string) (int, error) {
    90  	return 0, nil
    91  }
    92  
    93  // RemoveImage implements Service.RemoveImage but does nothing.
    94  func (e *EmptyService) RemoveImage(ctx context.Context, imageType options.ImageType) error {
    95  	return nil
    96  }