Debian Codegraph @

stress/v2/stress_client/package.go

raw symbols SCIP
1 package stressClient
2
3 // Package is a struct to enable communication between InsertStatements, QueryStatements and InfluxQLStatements and the stressClient backend
4 // Packages carry either writes or queries in the []byte that makes up the Body
5 type Package struct {
6 T Type
7 Body []byte
8 StatementID string
9 Tracer *Tracer
10 }
11
12 // NewPackage creates a new package with the appropriate payload
13 func NewPackage(t Type, body []byte, statementID string, tracer *Tracer) Package {
14 p := Package{
15 T: t,
16 Body: body,
17 StatementID: statementID,
18 Tracer: tracer,
19 }
20
21 return p
22 }