- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 94 for mock (0.15 sec)
-
internal/logger/targets.go
// AddSystemTarget adds a new logger target to the // list of enabled loggers func AddSystemTarget(ctx context.Context, t Target) error { if err := t.Init(ctx); err != nil { return err } swapSystemMuRW.Lock() defer swapSystemMuRW.Unlock() if consoleTgt == nil { if t.Type() == types.TargetConsole { consoleTgt = t } } updated := append(make([]Target, 0, len(systemTargets)+1), systemTargets...)
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Tue Apr 02 22:56:14 GMT 2024 - 6.1K bytes - Viewed (0) -
cmd/license-update.go
go func() { r := rand.New(rand.NewSource(time.Now().UnixNano())) // Leader node (that successfully acquires the lock inside licenceUpdaterLoop) // will keep performing the license update. If the leader goes down for some // reason, the lock will be released and another node will acquire it and // take over because of this loop. for { licenceUpdaterLoop(ctx, objAPI)
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Apr 04 12:04:40 GMT 2024 - 3.3K bytes - Viewed (0) -
internal/http/server.go
func (srv *Server) Shutdown() error { srv.listenerMutex.Lock() if srv.listener == nil { srv.listenerMutex.Unlock() return http.ErrServerClosed } srv.listenerMutex.Unlock() if atomic.AddUint32(&srv.inShutdown, 1) > 1 { // shutdown in progress return http.ErrServerClosed } // Close underneath HTTP listener. srv.listenerMutex.Lock() err := srv.listener.Close() srv.listenerMutex.Unlock()
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Fri Feb 09 21:25:16 GMT 2024 - 7.7K bytes - Viewed (0) -
internal/config/lambda/event/targetlist.go
type TargetList struct { sync.RWMutex targets map[TargetID]Target } // Add - adds unique target to target list. func (list *TargetList) Add(targets ...Target) error { list.Lock() defer list.Unlock() for _, target := range targets { if _, ok := list.targets[target.ID()]; ok { return fmt.Errorf("target %v already exists", target.ID()) } list.targets[target.ID()] = target }
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Tue Mar 07 16:12:41 GMT 2023 - 4.3K bytes - Viewed (0) -
internal/config/identity/openid/provider/keycloak.go
if err != nil { return err } defer resp.Body.Close() var accessToken Token if err = json.NewDecoder(resp.Body).Decode(&accessToken); err != nil { return err } k.Lock() k.accessToken = accessToken k.Unlock() return nil } // LookupUser lookup user by their userid. func (k *KeycloakProvider) LookupUser(userid string) (User, error) {
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Fri Apr 29 01:27:09 GMT 2022 - 4.6K bytes - Viewed (0) -
internal/config/browser/browser.go
config.KV{ Key: browserHSTSPreload, Value: config.EnableOff, }, config.KV{ Key: browserReferrerPolicy, Value: "strict-origin-when-cross-origin", }, } ) // configLock is a global lock for browser config var configLock sync.RWMutex // Config storage class configuration type Config struct { CSPPolicy string `json:"csp_policy"` HSTSSeconds int `json:"hsts_seconds"`
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Apr 11 01:10:30 GMT 2024 - 5.8K bytes - Viewed (0) -
cmd/bootstrap-peer-server.go
if clnt.gridConn.State() != grid.StateConnected { mu.Lock() offlineEndpoints = append(offlineEndpoints, fmt.Errorf("%s is unreachable: %w", clnt, grid.ErrDisconnected)) mu.Unlock() return } ctx, cancel := context.WithTimeout(ctx, 2*time.Second) defer cancel() err := clnt.Verify(ctx, srcCfg) mu.Lock() if err != nil {
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Apr 04 12:04:40 GMT 2024 - 7.5K bytes - Viewed (0) -
cmd/signals.go
func handleSignals() { // Custom exit function exit := func(success bool) { if globalLoggerOutput != nil { globalLoggerOutput.Close() } // If global profiler is set stop before we exit. globalProfilerMu.Lock() defer globalProfilerMu.Unlock() for _, p := range globalProfiler { p.Stop() } if success { os.Exit(0) } os.Exit(1) } stopProcess := func() bool {
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Wed May 01 17:57:52 GMT 2024 - 2.8K bytes - Viewed (0) -
cmd/erasure-common.go
// unformatted or simply not accessible for some reason. // // - Do not consume disks which are being healed // // - Future: skip busy disks return } mu.Lock() newDisks = append(newDisks, disks[i]) mu.Unlock() }() } wg.Wait() return newDisks } func (er erasureObjects) getOnlineLocalDisks() (newDisks []StorageAPI) { disks := er.getOnlineDisks()
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Sun Apr 28 17:53:50 GMT 2024 - 4.6K bytes - Viewed (0) -
cmd/generic-handlers_test.go
// Tests request guess function for net/rpc requests. func TestGuessIsRPC(t *testing.T) { if guessIsRPCReq(nil) { t.Fatal("Unexpected return for nil request") } u, err := url.Parse("http://localhost:9000/minio/lock") if err != nil { t.Fatal(err) } r := &http.Request{ Proto: "HTTP/1.0", Method: http.MethodPost, URL: u, } if !guessIsRPCReq(r) {
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Mar 28 17:44:56 GMT 2024 - 5.4K bytes - Viewed (0)