Skip to content

Commit

Permalink
make cohort storage private
Browse files Browse the repository at this point in the history
  • Loading branch information
tyiuhc committed Aug 6, 2024
1 parent 82cc98a commit 1fc1c3d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pkg/experiment/local/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type Client struct {
flagsMutex *sync.RWMutex
engine *evaluation.Engine
assignmentService *assignmentService
cohortStorage CohortStorage
cohortStorage cohortStorage
flagConfigStorage flagConfigStorage
cohortLoader *cohortLoader
deploymentRunner *deploymentRunner
Expand Down
4 changes: 2 additions & 2 deletions pkg/experiment/local/cohort_loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import (

type cohortLoader struct {
cohortDownloadApi cohortDownloadApi
cohortStorage CohortStorage
cohortStorage cohortStorage
jobs sync.Map
executor *sync.Pool
lockJobs sync.Mutex
}

func newCohortLoader(cohortDownloadApi cohortDownloadApi, cohortStorage CohortStorage) *cohortLoader {
func newCohortLoader(cohortDownloadApi cohortDownloadApi, cohortStorage cohortStorage) *cohortLoader {
return &cohortLoader{
cohortDownloadApi: cohortDownloadApi,
cohortStorage: cohortStorage,
Expand Down
2 changes: 1 addition & 1 deletion pkg/experiment/local/cohort_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"sync"
)

type CohortStorage interface {
type cohortStorage interface {
getCohort(cohortID string) *Cohort
getCohorts() map[string]*Cohort
getCohortsForUser(userID string, cohortIDs map[string]struct{}) map[string]struct{}
Expand Down
4 changes: 2 additions & 2 deletions pkg/experiment/local/deployment_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type deploymentRunner struct {
config *Config
flagConfigApi flagConfigApi
flagConfigStorage flagConfigStorage
cohortStorage CohortStorage
cohortStorage cohortStorage
cohortLoader *cohortLoader
lock sync.Mutex
poller *poller
Expand All @@ -23,7 +23,7 @@ func newDeploymentRunner(
config *Config,
flagConfigApi flagConfigApi,
flagConfigStorage flagConfigStorage,
cohortStorage CohortStorage,
cohortStorage cohortStorage,
cohortLoader *cohortLoader,
) *deploymentRunner {
dr := &deploymentRunner{
Expand Down

0 comments on commit 1fc1c3d

Please sign in to comment.