func newForwarder(dialer x.Dialer, dashboards []*shard.Shard, here *shard.Shard, srv *dashboard.DashboardServer) *forwarder { return &forwarder{ dashboards: shard.NewPopulate(dashboards), here: here, dialer: dialer, srv: srv, } }
func NewServer(dialer x.Dialer, timelines []*shard.Shard, dbDir string, cacheSize int) (*DashboardServer, error) { t := &DashboardServer{ timelines: shard.NewPopulate(timelines), dialer: dialer, } if err := t.Server.Init(dbDir, cacheSize); err != nil { return nil, err } return t, nil }
func newForwarder(dialer x.Dialer, timelines []*shard.Shard, here *shard.Shard, srv *timeline.TimelineServer, filter Filter) *forwarder { fwd := &forwarder{ filter: make(map[int64]struct{}), timelines: shard.NewPopulate(timelines), here: here, dialer: dialer, srv: srv, } for _, id := range filter { fwd.filter[id] = struct{}{} } return fwd }