(load func(ctx context.Context) (*clusterState, error), reloadInterval time.Duration)
| 1069 | } |
| 1070 | |
| 1071 | func newClusterStateHolder(load func(ctx context.Context) (*clusterState, error), reloadInterval time.Duration) *clusterStateHolder { |
| 1072 | return &clusterStateHolder{ |
| 1073 | load: load, |
| 1074 | reloadInterval: reloadInterval, |
| 1075 | } |
| 1076 | } |
| 1077 | |
| 1078 | func (c *clusterStateHolder) Reload(ctx context.Context) (*clusterState, error) { |
| 1079 | state, err := c.load(ctx) |
no outgoing calls