snowflake/common/messages/ipc.go
Cecylia Bocovich 8343bbc336
Add context with timeout for client requests
Client timeouts are currently counted from when the client is matched
with a proxy. Instead, count client timeouts from the moment when the
request is received.

Closes #40449
2025-03-26 13:30:59 -04:00

30 lines
632 B
Go

package messages
import (
"context"
"errors"
)
type RendezvousMethod string
const (
RendezvousHttp RendezvousMethod = "http"
RendezvousAmpCache RendezvousMethod = "ampcache"
RendezvousSqs RendezvousMethod = "sqs"
)
type Arg struct {
Body []byte
RemoteAddr string
RendezvousMethod RendezvousMethod
Context context.Context
}
var (
ErrBadRequest = errors.New("bad request")
ErrInternal = errors.New("internal error")
ErrExtraInfo = errors.New("client sent extra info")
StrTimedOut = "timed out waiting for answer!"
StrNoProxies = "no snowflake proxies currently available"
)