Documentation
¶
Overview ¶
Package binarystore reads files from a Dapr Binary Store component through an app's sidecar gRPC API (GetBinaryFileAlpha1). The key goes through the gRPC FileName field unchanged: keys contain "/", which daprd's HTTP route cannot carry.
Index ¶
Constants ¶
View Source
const MaxBytes int64 = 1 << 20
MaxBytes is the largest payload Read returns (1 MiB).
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnProvider ¶
type ConnProvider interface {
Conn(addr string) (*grpc.ClientConn, error)
}
ConnProvider hands out gRPC connections to sidecars (workflow.SidecarPool).
type Error ¶
type Error struct {
Kind Kind
Msg string
// Size is the known payload size (KindTooLarge only).
Size int64
Unavailable bool
}
Error is the typed failure returned by Service.Read.
type Kind ¶
type Kind int
Kind classifies a read failure so the HTTP layer can map it to a status.
const ( KindAppNotFound Kind = iota + 1 // 404 KindSidecarUnreachable // 503 (also GRPCPort == 0) KindStoreNotLoaded // 400 KindFileNotFound // 404 (gRPC NotFound) KindInvalid // 400 (gRPC InvalidArgument) KindUnsupported // 400 (gRPC Unimplemented) KindTooLarge // 413 KindUpstream // 503 if Unavailable, else 502 KindTimeout // 504 (gRPC DeadlineExceeded / read timeout) )
Click to show internal directories.
Click to hide internal directories.