Documentation ¶
Index ¶
- Constants
- Variables
- func CreateEventSubscription(w http.ResponseWriter, r *http.Request)
- func CreateNetworkSubscription(w http.ResponseWriter, r *http.Request)
- func DeleteEventSubscriptionById(w http.ResponseWriter, r *http.Request)
- func DeleteNetworkSubscriptionById(w http.ResponseWriter, r *http.Request)
- func GetEventSubscription(w http.ResponseWriter, r *http.Request)
- func GetEventSubscriptionById(w http.ResponseWriter, r *http.Request)
- func GetNetworkSubscription(w http.ResponseWriter, r *http.Request)
- func GetNetworkSubscriptionById(w http.ResponseWriter, r *http.Request)
- func Init() (err error)
- func Logger(inner http.Handler, name string) http.Handler
- func PostDataflowQuery(w http.ResponseWriter, r *http.Request)
- func PostEventQuery(w http.ResponseWriter, r *http.Request)
- func PostHttpQuery(w http.ResponseWriter, r *http.Request)
- func PostNetworkQuery(w http.ResponseWriter, r *http.Request)
- func PostSeqQuery(w http.ResponseWriter, r *http.Request)
- func Run() (err error)
- func Stop()
- type DataflowMetric
- type DataflowMetricList
- type DataflowMetrics
- type DataflowQueryParams
- type EventMetric
- type EventMetricList
- type EventQueryParams
- type EventRegistration
- type EventSubscription
- type EventSubscriptionList
- type EventSubscriptionParams
- type EventsCallbackReference
- type HttpMetric
- type HttpMetricList
- type HttpQueryParams
- type NetworkCallbackReference
- type NetworkMetric
- type NetworkMetricList
- type NetworkQueryParams
- type NetworkRegistration
- type NetworkSubscription
- type NetworkSubscriptionList
- type NetworkSubscriptionParams
- type Scope
- type SeqMetric
- type SeqMetricList
- type SeqMetrics
- type SeqQueryParams
- type Tag
Constants ¶
View Source
const ModuleName = "meep-metrics-engine"
View Source
const ServiceName = "Metrics Engine"
Variables ¶
View Source
var METRICS_DB = 0
View Source
var SandboxName string
Functions ¶
func CreateEventSubscription ¶
func CreateEventSubscription(w http.ResponseWriter, r *http.Request)
func CreateNetworkSubscription ¶
func CreateNetworkSubscription(w http.ResponseWriter, r *http.Request)
func DeleteEventSubscriptionById ¶
func DeleteEventSubscriptionById(w http.ResponseWriter, r *http.Request)
func DeleteNetworkSubscriptionById ¶
func DeleteNetworkSubscriptionById(w http.ResponseWriter, r *http.Request)
func GetEventSubscription ¶
func GetEventSubscription(w http.ResponseWriter, r *http.Request)
func GetEventSubscriptionById ¶
func GetEventSubscriptionById(w http.ResponseWriter, r *http.Request)
func GetNetworkSubscription ¶
func GetNetworkSubscription(w http.ResponseWriter, r *http.Request)
func GetNetworkSubscriptionById ¶
func GetNetworkSubscriptionById(w http.ResponseWriter, r *http.Request)
func PostDataflowQuery ¶
func PostDataflowQuery(w http.ResponseWriter, r *http.Request)
func PostEventQuery ¶
func PostEventQuery(w http.ResponseWriter, r *http.Request)
func PostHttpQuery ¶
func PostHttpQuery(w http.ResponseWriter, r *http.Request)
func PostNetworkQuery ¶
func PostNetworkQuery(w http.ResponseWriter, r *http.Request)
func PostSeqQuery ¶
func PostSeqQuery(w http.ResponseWriter, r *http.Request)
Types ¶
type DataflowMetric ¶
type DataflowMetric struct { // Time of interaction Time string `json:"time,omitempty"` // Mermaid formatted dataflow logs Mermaid string `json:"mermaid,omitempty"` }
dataflow diagram logs
type DataflowMetricList ¶
type DataflowMetricList struct { // Response name Name string `json:"name,omitempty"` // columns included in response based on queried values Columns []string `json:"columns,omitempty"` Values []DataflowMetric `json:"values,omitempty"` }
type DataflowMetrics ¶
type DataflowMetrics struct { DataflowMetricList *DataflowMetricList `json:"dataflowMetricList,omitempty"` // String of dataflow metrics with unique interactions DataflowMetricString string `json:"dataflowMetricString,omitempty"` }
type DataflowQueryParams ¶
type DataflowQueryParams struct { // Tag names to match in query. Supported values:<br> Tags []Tag `json:"tags,omitempty"` Scope *Scope `json:"scope,omitempty"` // Requested information. Supported values:<br><li>mermaid: Mermaid format<br> Fields []string `json:"fields,omitempty"` // Queried response Type. Supported Values:<br> NOTE1: only one of listonly or responly may be included NOTE2: if listonly or responly are not included, the response contains both the list and string <li>listonly: Include only a list of dataflow metrics in response<br> <li>stronly: Include only a concatenated string of dataflow metrics in response<br> ResponseType string `json:"responseType,omitempty"` }
Seq metrics query parameters
type EventMetric ¶
type EventMetric struct { // Time of event metrics Time string `json:"time,omitempty"` // JSON-fomatted event Event string `json:"event,omitempty"` }
Value of a single event metric
type EventMetricList ¶
type EventMetricList struct { // Response name Name string `json:"name,omitempty"` // columns included in response based on queried values Columns []string `json:"columns,omitempty"` Values []EventMetric `json:"values,omitempty"` }
Event metrics query response
type EventQueryParams ¶
type EventQueryParams struct { // Tag names to match in query. Supported values:<br> <li>type: Destination network element name Tags []Tag `json:"tags,omitempty"` // Field names to return in query response. Supported values:<br> <li>event: Downlink packet loss from dest to src (%) Fields []string `json:"fields,omitempty"` Scope *Scope `json:"scope,omitempty"` }
Event metrics query parameters
type EventRegistration ¶
type EventRegistration struct {
// contains filtered or unexported fields
}
type EventSubscription ¶
type EventSubscription struct { // Subscription identifier SubscriptionId string `json:"subscriptionId,omitempty"` // Uniquely identifies this create subscription request. If there is a communication failure during the request, using the same clientCorrelator when retrying the request allows the operator to avoid creating a duplicate subscription. ClientCorrelator string `json:"clientCorrelator,omitempty"` CallbackReference *EventsCallbackReference `json:"callbackReference,omitempty"` // Self referring URL. ResourceURL string `json:"resourceURL,omitempty"` EventQueryParams *EventQueryParams `json:"eventQueryParams,omitempty"` // Notification interval in seconds, disabled if set to 0 Period int32 `json:"period,omitempty"` // Type of subscription triggering notifications SubscriptionType string `json:"subscriptionType,omitempty"` }
Events metrics subscription response
type EventSubscriptionList ¶
type EventSubscriptionList struct { EventSubscription []EventSubscription `json:"eventSubscription,omitempty"` // Self referring URL. ResourceURL string `json:"resourceURL,omitempty"` }
type EventSubscriptionParams ¶
type EventSubscriptionParams struct { // Uniquely identifies this create subscription request. If there is a communication failure during the request, using the same clientCorrelator when retrying the request allows the operator to avoid creating a duplicate subscription. ClientCorrelator string `json:"clientCorrelator,omitempty"` CallbackReference *EventsCallbackReference `json:"callbackReference,omitempty"` EventQueryParams *EventQueryParams `json:"eventQueryParams,omitempty"` // Notification interval in seconds, disabled if set to 0 Period int32 `json:"period,omitempty"` // Type of subscription triggering notifications SubscriptionType string `json:"subscriptionType,omitempty"` }
Events subscription parameters
type EventsCallbackReference ¶
type EventsCallbackReference struct { // The URL of your own listener application. NotifyURL string `json:"notifyURL"` }
Notification callback definition.
type HttpMetric ¶
type HttpMetric struct { // Time of http metrics Time string `json:"time,omitempty"` // Http metrics identifier Id int32 `json:"id,omitempty"` // Http metrics queried endpoint Endpoint string `json:"endpoint,omitempty"` // Http metrics queried endpoint with query parameters Url string `json:"url,omitempty"` // Http metrics method Method string `json:"method,omitempty"` // Http metrics response status code RespCode string `json:"resp_code,omitempty"` // Http metrics response body RespBody string `json:"resp_body,omitempty"` // Http metrics body Body string `json:"body,omitempty"` // Request processing time in ms ProcTime string `json:"proc_time,omitempty"` // Service processing the http metric LoggerName string `json:"logger_name,omitempty"` // Http metric type (request, response, notification) MsgType string `json:"msg_type,omitempty"` // DEPRECATED -- Http type Direction string `json:"direction,omitempty"` }
Value of a single http metric
type HttpMetricList ¶
type HttpMetricList struct { // Response name Name string `json:"name,omitempty"` // columns included in response based on queried values Columns []string `json:"columns,omitempty"` Values []HttpMetric `json:"values,omitempty"` }
Http metrics query response
type HttpQueryParams ¶
type HttpQueryParams struct { // Tag names to match in query. Supported values:<br> <li>logger_name: Logger instances that issued the http notification or processed the request <li>msg_type: Http metric type (request, response, notification) Tags []Tag `json:"tags,omitempty"` // Field names to return in query response. Supported values:<br> <li>id: Http metrics identifier<br> <li>endpoint: Http metrics queried endpoint<br> <li>url: Http metrics queried endpoint with query parameters<br> <li>method: Http metrics method<br> <li>resp_code: Http metrics response status code<br> <li>resp_body: Http metrics response body<br> <li>body: Http metrics body<br> <li>proc_time: Request processing time in ms<br> <li>logger_name: Logger instances that issued the http notification or processed the request<br> <li>msg_type: Http metric type (request, response, notification)<br> <li>direction: DEPRECATED -- Http metric direction (RX, TX) Fields []string `json:"fields,omitempty"` Scope *Scope `json:"scope,omitempty"` }
Http metrics query parameters
type NetworkCallbackReference ¶
type NetworkCallbackReference struct { // The URL of your own listener application. NotifyURL string `json:"notifyURL"` }
Notification callback definition.
type NetworkMetric ¶
type NetworkMetric struct { // Time of network metrics Time string `json:"time,omitempty"` // Round-trip latency (ms) Lat int32 `json:"lat,omitempty"` // Uplink throughput from src to dest (Mbps) Ul float64 `json:"ul,omitempty"` // Downlink throughput from dest to src (Mbps) Dl float64 `json:"dl,omitempty"` // Uplink packet loss from src to dest (%) Ulos float64 `json:"ulos,omitempty"` // Uplink packet loss from dest to src (%) Dlos float64 `json:"dlos,omitempty"` }
Value of a single network metric
type NetworkMetricList ¶
type NetworkMetricList struct { // Response name Name string `json:"name,omitempty"` // columns included in response based on queried values Columns []string `json:"columns,omitempty"` Values []NetworkMetric `json:"values,omitempty"` }
Network metrics query response
type NetworkQueryParams ¶
type NetworkQueryParams struct { // Tag names to match in query. Supported values:<br> <li>src: Source network element name <li>dest: Destination network element name Tags []Tag `json:"tags,omitempty"` // Field names to return in query response. Supported values:<br> <li>lat: Round-trip latency (ms)<br> <li>ul: Uplink throughput from src to dest (Mbps) <li>dl: Downlink throughput from dest to src (Mbps) <li>ulos: Uplink packet loss from src to dest (%) <li>dlos: Downlink packet loss from dest to src (%) Fields []string `json:"fields,omitempty"` Scope *Scope `json:"scope,omitempty"` }
Network metrics query parameters
type NetworkRegistration ¶
type NetworkRegistration struct {
// contains filtered or unexported fields
}
type NetworkSubscription ¶
type NetworkSubscription struct { // Subscription identifier SubscriptionId string `json:"subscriptionId,omitempty"` // Uniquely identifies this create subscription request. If there is a communication failure during the request, using the same clientCorrelator when retrying the request allows the operator to avoid creating a duplicate subscription. ClientCorrelator string `json:"clientCorrelator,omitempty"` CallbackReference *NetworkCallbackReference `json:"callbackReference,omitempty"` // Self referring URL. ResourceURL string `json:"resourceURL,omitempty"` NetworkQueryParams *NetworkQueryParams `json:"networkQueryParams,omitempty"` // Notification interval in seconds, disabled if set to 0 Period int32 `json:"period,omitempty"` // Type of subscription triggering notifications SubscriptionType string `json:"subscriptionType,omitempty"` }
Network metrics subscription response
type NetworkSubscriptionList ¶
type NetworkSubscriptionList struct { NetworkSubscription []NetworkSubscription `json:"networkSubscription,omitempty"` // Self referring URL. ResourceURL string `json:"resourceURL,omitempty"` }
type NetworkSubscriptionParams ¶
type NetworkSubscriptionParams struct { // Uniquely identifies this create subscription request. If there is a communication failure during the request, using the same clientCorrelator when retrying the request allows the operator to avoid creating a duplicate subscription. ClientCorrelator string `json:"clientCorrelator,omitempty"` CallbackReference *NetworkCallbackReference `json:"callbackReference,omitempty"` NetworkQueryParams *NetworkQueryParams `json:"networkQueryParams,omitempty"` // Notification interval in seconds Period int32 `json:"period,omitempty"` // Type of subscription triggering notifications SubscriptionType string `json:"subscriptionType,omitempty"` }
Network metrics subscription parameters
type Scope ¶
type Scope struct { // Maximum number of points in the response Limit int32 `json:"limit,omitempty"` // Length of time range (specify s for seconds, m for minutes, d for days) Duration string `json:"duration,omitempty"` }
Query scope (time / number of points)
type SeqMetric ¶
type SeqMetric struct { // Time of Seq logs Time string `json:"time,omitempty"` // Mermaid formatted seq logs Mermaid string `json:"mermaid,omitempty"` // Sequencediagram.org formatted seq logs Sdorg string `json:"sdorg,omitempty"` }
Sequence diagram logs
type SeqMetricList ¶
type SeqMetricList struct { // Response name Name string `json:"name,omitempty"` // columns included in response based on queried values Columns []string `json:"columns,omitempty"` Values []SeqMetric `json:"values,omitempty"` }
Seq metrics query response
type SeqMetrics ¶
type SeqMetrics struct { SeqMetricList *SeqMetricList `json:"seqMetricList,omitempty"` // String of sequence metrics SeqMetricString string `json:"seqMetricString,omitempty"` }
type SeqQueryParams ¶
type SeqQueryParams struct { // Tag names to match in query. Supported values:<br> Tags []Tag `json:"tags,omitempty"` // Requested information. Supported values:<br> NOTE: only one of mermaid or sdorg must be included <li>mermaid: Mermaid format<br> <li>sdorg: Sequencediagram.org format<br> Fields []string `json:"fields,omitempty"` // Queried response Type. Supported Values:<br> NOTE1: only one of listonly or responly may be included NOTE2: if listonly or responly are not included, the response contains both the list and string <li>listonly: Include only a list of sequence metrics in response<br> <li>stronly: Include only a concatenated string of sequence metrics in response<br> ResponseType string `json:"responseType,omitempty"` Scope *Scope `json:"scope,omitempty"` }
Seq metrics query parameters
Source Files ¶
- api_metrics.go
- api_subscriptions.go
- convert.go
- logger.go
- metrics-engine.go
- model_dataflow_metric.go
- model_dataflow_metric_list.go
- model_dataflow_metrics.go
- model_dataflow_query_params.go
- model_event_metric.go
- model_event_metric_list.go
- model_event_query_params.go
- model_event_subscription.go
- model_event_subscription_list.go
- model_event_subscription_params.go
- model_events_callback_reference.go
- model_http_metric.go
- model_http_metric_list.go
- model_http_query_params.go
- model_network_callback_reference.go
- model_network_metric.go
- model_network_metric_list.go
- model_network_query_params.go
- model_network_subscription.go
- model_network_subscription_list.go
- model_network_subscription_params.go
- model_scope.go
- model_seq_metric.go
- model_seq_metric_list.go
- model_seq_metrics.go
- model_seq_query_params.go
- model_tag.go
Click to show internal directories.
Click to hide internal directories.