func Logger(l log.Logger) Option {
	return func(r *Ringpop) error {
		logging.SetLogger(l)
		return nil
	}
}
Logger is used to specify a bark-compatible logger that will be used for
all Ringpop logging. If a logger is not provided, one will be created
automatically.
package ringpop
import (
	"errors"
	"time"
	"github.com/benbjohnson/clock"
	log "github.com/uber-common/bark"
	"github.com/uber/ringpop-go/hashring"
	"github.com/uber/ringpop-go/logging"
	"github.com/uber/ringpop-go/membership"
	"github.com/uber/ringpop-go/shared"
	"github.com/uber/ringpop-go/swim"
	"github.com/uber/ringpop-go/util"
)
type configuration struct {
	App string
	MembershipChecksumStatPeriod time.Duration
	RingChecksumStatPeriod       time.Duration
	StateTimeouts swim.StateTimeouts
	LabelLimits swim.LabelOptions
	InitialLabels swim.LabelMap
	SelfEvict swim.SelfEvictOptions
	RequiresAppInPing bool
}
type Option func(*Ringpop) error
func applyOptions(r *Ringpop, opts []Option) error {
	for _, option := range opts {
		err := option(r)
		if err != nil {
			return err
		}
	}
	return nil
}
func checkOptions(rp *Ringpop) []error {
	errs := []error{}
	if rp.channel == nil {
		errs = append(errs, errors.New("channel is required"))
	}
	if rp.addressResolver == nil {
		errs = append(errs, errors.New("address resolver is nil"))
	}
	return errs
}
func Clock(c clock.Clock) Option {
	return func(r *Ringpop) error {
		if c == nil {
			return errors.New("clock is required")
		}
		r.clock = c
		return nil
	}
}
func Channel(ch shared.TChannel) Option {
	return func(r *Ringpop) error {
		r.channel = ch
		return nil
	}
}
func HashRingConfig(c *hashring.Configuration) Option {
	return func(r *Ringpop) error {
		r.configHashRing = c
		return nil
	}
}