func GetDistributorBuilder(plc CTPolicyType, lcBuilder LogClientBuilder, mf monitoring.MetricFactory) DistributorBuilder {
	if plc == AppleCTPolicy {
		return func(ll *loglist2.LogList) (*Distributor, error) {
			return NewDistributor(ll, ctpolicy.AppleCTPolicy{}, lcBuilder, mf)
		}
	}
	return func(ll *loglist2.LogList) (*Distributor, error) {
		return NewDistributor(ll, ctpolicy.ChromeCTPolicy{}, lcBuilder, mf)
	}
}
GetDistributorBuilder given CT-policy type and Log-client builder produces
Distributor c-tor.
package submission
import (
	"context"
	"fmt"
	"sync"
	"time"
	"github.com/golang/glog"
	ct "github.com/google/certificate-transparency-go"
	"github.com/google/certificate-transparency-go/asn1"
	"github.com/google/certificate-transparency-go/ctpolicy"
	"github.com/google/certificate-transparency-go/loglist2"
	"github.com/google/certificate-transparency-go/schedule"
	"github.com/google/certificate-transparency-go/tls"
	"github.com/google/certificate-transparency-go/x509util"
	"github.com/google/trillian/monitoring"
)
type CTPolicyType int
const (
	ChromeCTPolicy CTPolicyType = iota
	AppleCTPolicy
)
var (
	proxyOnce      sync.Once
	logListUpdates monitoring.Counter
	rspLatency     monitoring.Histogram  
)
func proxyInitMetrics(mf monitoring.MetricFactory) {
	logListUpdates = mf.NewCounter("log_list_updates", "Number of Log-list updates")
	rspLatency = mf.NewHistogram("http_latency", "Latency of policy-multiplexed add-responses in seconds", "ep")
}
type DistributorBuilder func(*loglist2.LogList) (*Distributor, error)