Documentation
¶
Index ¶
Constants ¶
View Source
const ( XML_PREFIX = "xml" JSON_PREFIX = "json" )
These strings are prefixed onto data put in the backend, to designate its type.
View Source
const ( CASSANDRA_DEFAULT_TTL_SECONDS = 2400 REDIS_DEFAULT_EXPIRATION_MINUTES = 60 RATE_LIMITER_NUM_REQUESTS = 100 REQUEST_MAX_SIZE_BYTES = 10 * 1024 REQUEST_MAX_NUM_VALUES = 10 REQUEST_MAX_TTL_SECONDS = 3600 )
The following numeric constants serve as configuration defaults
View Source
const ( MISSING_KEY = iota // GET http.StatusBadRequest 400 RECORD_EXISTS // PUT http.StatusBadRequest 400 PUT_MAX_NUM_VALUES // PUT http.StatusBadRequest 400 PUT_BAD_REQUEST // PUT http.StatusBadRequest 400 NEGATIVE_TTL // PUT http.StatusBadRequest 400 MALFORMED_XML // PUT http.StatusBadRequest 400 UNSUPPORTED_DATA_TO_STORE // PUT http.StatusBadRequest 400 MISSING_VALUE // PUT http.StatusBadRequest 400 BAD_PAYLOAD_SIZE // PUT http.StatusBadRequest 400 KEY_NOT_FOUND // GET http.StatusNotFound 404 KEY_LENGTH // GET http.StatusNotFound 404 UNKNOWN_STORED_DATA_TYPE // GET http.StatusInternalServerError 500 PUT_INTERNAL_SERVER // PUT http.StatusInternalServerError 500 MARSHAL_RESPONSE // PUT http.StatusInternalServerError 500 PUT_DEADLINE_EXCEEDED // PUT HttpDependencyTimeout 597 )
Prebid Cache error types
View Source
const HTTPDependencyTimeout = 597
HTTPDependencyTimeout is the status code for errors due to a downstream dependency timeout.
Variables ¶
This section is empty.
Functions ¶
func GenerateRandomID ¶
GenerateRandomID generates a "github.com/gofrs/uuid" UUID
func GetServerName ¶
func GetServerName() string
GetServerName Generates server name from node and pod name in K8S environment
Types ¶
type PBCError ¶
PBCError implements the error interface
func NewPBCError ¶
NewPBCError returns an error with either a custom error message or not. The only required parameter is errType
Click to show internal directories.
Click to hide internal directories.