Documentation ¶
Index ¶
Examples ¶
Constants ¶
View Source
const ( PkgPath = "github/advanced-go/log/event1" Route = "log-events" )
Variables ¶
This section is empty.
Functions ¶
func Put ¶
Put - event1 PUT, with optional content override
Example ¶
entries, _ := jsonx.New[[]Entry](testrsc.LOG1IngressEntry, nil) h := make(http.Header) h.Add(core.XExchangeStatus, jsonx.StatusTimeoutUri) //ex := core.NewExchangeOverride("", "", json.StatusTimeoutUri) //ctx := core.NewExchangeOverrideContext(nil, ex) _, status := put[core.Output, Entry](context.Background(), h, entries) fmt.Printf("test: put() -> [status:%v]\n", status)
Output: test: put() -> [status:Timeout]
Types ¶
type Entry ¶
type Entry struct { CustomerId string `json:"customer-id"` StartTime time.Time `json:"start-time"` Duration int64 `json:"duration"` Traffic string `json:"traffic"` CreatedTS time.Time `json:"created-ts"` Origin core.Origin `json:"origin"` RequestId string `json:"request-id"` RelatesTo string `json:"relates-to"` Location string `json:"location"` Protocol string `json:"proto"` Method string `json:"method"` From string `json:"from"` To string `json:"to"` Uri string `json:"uri"` Path string `json:"path"` Query string `json:"query"` StatusCode int32 `json:"status-code"` Encoding string `json:"encoding"` Bytes int64 `json:"bytes"` Timeout int32 `json:"timeout"` RateLimit float64 `json:"rate-limit"` RateBurst int32 `json:"rate-burst"` ControllerCode string `json:"cc"` }
Entry - timeseries access log struct
func EgressQuery ¶
func IngressQuery ¶
Click to show internal directories.
Click to hide internal directories.