...

Source file src/github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/events_test.go

Documentation: github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1

     1  //go:build windows
     2  
     3  package main
     4  
     5  import "context"
     6  
     7  type fakePublisher struct {
     8  	events []interface{}
     9  }
    10  
    11  var _ publisher = &fakePublisher{}
    12  
    13  func newFakePublisher() *fakePublisher {
    14  	return &fakePublisher{}
    15  }
    16  
    17  func (p *fakePublisher) publishEvent(ctx context.Context, topic string, event interface{}) (err error) {
    18  	if p == nil {
    19  		return nil
    20  	}
    21  	p.events = append(p.events, event)
    22  	return nil
    23  }
    24  

View as plain text