------------------------------------------------------------------------------
| 1060 | //------------------------------------------------------------------------------ |
| 1061 | |
| 1062 | type clusterStateHolder struct { |
| 1063 | load func(ctx context.Context) (*clusterState, error) |
| 1064 | |
| 1065 | reloadInterval time.Duration |
| 1066 | state atomic.Value |
| 1067 | reloading uint32 // atomic |
| 1068 | reloadPending uint32 // atomic - set to 1 when reload is requested during active reload |
| 1069 | } |
| 1070 | |
| 1071 | func newClusterStateHolder(load func(ctx context.Context) (*clusterState, error), reloadInterval time.Duration) *clusterStateHolder { |
| 1072 | return &clusterStateHolder{ |
nothing calls this directly
no outgoing calls
no test coverage detected