...

Source file src/github.com/launchdarkly/go-server-sdk/v6/subsystems/data_source.go

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

     1  package subsystems
     2  
     3  import "io"
     4  
     5  // DataSource describes the interface for an object that receives feature flag data.
     6  type DataSource interface {
     7  	io.Closer
     8  
     9  	// IsInitialized returns true if the data source has successfully initialized at some point.
    10  	//
    11  	// Once this is true, it should remain true even if a problem occurs later.
    12  	IsInitialized() bool
    13  
    14  	// Start tells the data source to begin initializing. It should not try to make any connections
    15  	// or do any other significant activity until Start is called.
    16  	//
    17  	// The data source should close the closeWhenReady channel if and when it has either successfully
    18  	// initialized for the first time, or determined that initialization cannot ever succeed.
    19  	Start(closeWhenReady chan<- struct{})
    20  }
    21  

View as plain text