github.com/cilium/cilium@v1.16.2/pkg/hubble/metrics/tcp/plugin.go (about)

     1  // SPDX-License-Identifier: Apache-2.0
     2  // Copyright Authors of Hubble
     3  
     4  package tcp
     5  
     6  import (
     7  	"github.com/cilium/cilium/pkg/hubble/metrics/api"
     8  )
     9  
    10  type tcpPlugin struct{}
    11  
    12  func (p *tcpPlugin) NewHandler() api.Handler {
    13  	return &tcpHandler{}
    14  }
    15  
    16  func (p *tcpPlugin) HelpText() string {
    17  	return `tcp - TCP metrics
    18  Metrics related to the TCP protocol
    19  
    20  Metrics:
    21    hubble_tcp_flags_total - Distribution of TCP flags
    22  
    23  Options:` +
    24  		api.ContextOptionsHelp
    25  }
    26  
    27  func init() {
    28  	api.DefaultRegistry().Register("tcp", &tcpPlugin{})
    29  }