Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for Ling (0.03 sec)

  1. internal/event/target/postgresql.go

    	if err := target.init(); err != nil {
    		return false, err
    	}
    	return target.isActive()
    }
    
    func (target *PostgreSQLTarget) isActive() (bool, error) {
    	if err := target.db.Ping(); err != nil {
    		if IsConnErr(err) {
    			return false, store.ErrNotConnected
    		}
    		return false, err
    	}
    	return true, nil
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  2. internal/grid/grid.go

    	biggerBufMin = 32 << 10
    
    	// This is the maximum size of bigger buffers.
    	biggerBufMax = maxBufferSize
    
    	// If there is a queue, merge up to this many messages.
    	maxMergeMessages = 30
    
    	// clientPingInterval will ping the remote handler every 15 seconds.
    	// Clients disconnect when we exceed 2 intervals.
    	clientPingInterval = 15 * time.Second
    
    	// Deadline for single (non-streaming) requests to complete.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Apr 02 15:56:18 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  3. internal/grid/muxserver.go

    	if m.outBlock == nil {
    		// Closed
    		return
    	}
    	select {
    	case m.outBlock <- struct{}{}:
    	default:
    		gridLogIf(m.ctx, errors.New("output unblocked overflow"))
    	}
    }
    
    func (m *muxServer) ping(seq uint32) pongMsg {
    	if !m.checkSeq(seq) {
    		msg := fmt.Sprintf("receive sequence number mismatch. want %d, got %d", m.RecvSeq, seq)
    		return pongMsg{Err: &msg}
    	}
    	select {
    	case <-m.ctx.Done():
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Jun 07 15:51:52 UTC 2024
    - 9.7K bytes
    - Viewed (0)
  4. internal/ringbuffer/README.md

    
    # Blocking vs Non-blocking
    
    The default behavior of the ring buffer is non-blocking, 
    meaning that reads and writes will return immediately with an error if the operation cannot be completed.
    If you want to block when reading or writing, you must enable it:
    
    ```go
    	rb := ringbuffer.New(1024).SetBlocking(true)
    ```
    
    Enabling blocking will cause the ring buffer to behave like a buffered [io.Pipe](https://pkg.go.dev/io#Pipe).
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed May 15 00:11:04 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  5. cmd/consolelogger.go

    	console  *console.Target
    	nodeName string
    	logBuf   *ring.Ring
    }
    
    // NewConsoleLogger - creates new HTTPConsoleLoggerSys with all nodes subscribed to
    // the console logging pub sub system
    func NewConsoleLogger(ctx context.Context, w io.Writer) *HTTPConsoleLoggerSys {
    	return &HTTPConsoleLoggerSys{
    		pubsub:  pubsub.New[log.Info, madmin.LogMask](8),
    		console: console.New(w),
    		logBuf:  ring.New(defaultLogBufferCount),
    	}
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  6. internal/event/target/elasticsearch.go

    		if resp.IsError() {
    			return fmt.Errorf("Create index err: %v", res)
    		}
    		return nil
    	}
    	return nil
    }
    
    func (c *esClientV7) ping(ctx context.Context, _ ElasticsearchArgs) (bool, error) {
    	resp, err := c.Ping(
    		c.Ping.WithContext(ctx),
    	)
    	if err != nil {
    		return false, store.ErrNotConnected
    	}
    	xhttp.DrainBody(resp.Body)
    	return !resp.IsError(), nil
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 15K bytes
    - Viewed (0)
  7. internal/grid/muxclient.go

    				return
    			}
    		}
    	}
    }
    
    // doPing checks last ping time and sends another ping.
    func (m *muxClient) doPing(respHandler chan<- Response) (ok bool) {
    	m.respMu.Lock()
    	if m.closed {
    		m.respMu.Unlock()
    		// Already closed. This is not an error state;
    		// we may just be delivering the last responses.
    		return true
    	}
    
    	// Only check ping when not closed.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Jun 07 15:51:52 UTC 2024
    - 15.9K bytes
    - Viewed (0)
  8. internal/ringbuffer/ring_buffer.go

    	return &RingBuffer{
    		buf:  b,
    		size: len(b),
    	}
    }
    
    // SetBlocking sets the blocking mode of the ring buffer.
    // If block is true, Read and Write will block when there is no data to read or no space to write.
    // If block is false, Read and Write will return ErrIsEmpty or ErrIsFull immediately.
    // By default, the ring buffer is not blocking.
    // This setting should be called before any Read or Write operation or after a Reset.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed May 15 00:11:04 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  9. internal/event/target/nsq.go

    		producer, err := nsq.NewProducer(target.args.NSQDAddress.String(), target.config)
    		if err != nil {
    			return false, err
    		}
    		target.producer = producer
    	}
    
    	if err := target.producer.Ping(); err != nil {
    		// To treat "connection refused" errors as errNotConnected.
    		if xnet.IsConnRefusedErr(err) {
    			return false, store.ErrNotConnected
    		}
    		return false, err
    	}
    	return true, nil
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  10. internal/grid/connection.go

    		conn.Close()
    		c.handleMsgWg.Done()
    	}()
    
    	c.connMu.Lock()
    	connPingInterval := c.connPingInterval
    	c.connMu.Unlock()
    	ping := time.NewTicker(connPingInterval)
    	pingFrame := message{
    		Op:         OpPing,
    		DeadlineMS: 5000,
    	}
    
    	defer ping.Stop()
    	queue := make([][]byte, 0, maxMergeMessages)
    	merged := make([]byte, 0, writeBufferSize)
    	var queueSize int
    	var buf bytes.Buffer
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Jun 07 15:51:52 UTC 2024
    - 44.8K bytes
    - Viewed (0)
Back to top