github.com/asynkron/protoactor-go@v0.0.0-20240308120642-ef91a6abee75/cluster/clusterproviders/consul/options.go (about)

     1  package consul
     2  
     3  import "time"
     4  
     5  type Option func(p *Provider)
     6  
     7  func WithTTL(ttl time.Duration) Option {
     8  	return func(p *Provider) {
     9  		p.ttl = ttl
    10  	}
    11  }
    12  
    13  func WithRefreshTTL(refreshTTL time.Duration) Option {
    14  	return func(p *Provider) {
    15  		p.refreshTTL = refreshTTL
    16  	}
    17  }