...

Source file src/github.com/launchdarkly/go-server-sdk/v6/internal/datasource/null_data_source.go

Documentation: github.com/launchdarkly/go-server-sdk/v6/internal/datasource

     1  package datasource
     2  
     3  import "github.com/launchdarkly/go-server-sdk/v6/subsystems"
     4  
     5  // NewNullDataSource returns a stub implementation of DataSource.
     6  func NewNullDataSource() subsystems.DataSource {
     7  	return nullDataSource{}
     8  }
     9  
    10  type nullDataSource struct{}
    11  
    12  func (n nullDataSource) IsInitialized() bool {
    13  	return true
    14  }
    15  
    16  func (n nullDataSource) Close() error {
    17  	return nil
    18  }
    19  
    20  func (n nullDataSource) Start(closeWhenReady chan<- struct{}) {
    21  	close(closeWhenReady)
    22  }
    23  

View as plain text