Opens a TCP socket to a destination on the bound private network.
The private destination, as host:port or a SocketAddress.
The connected socket.
Sends an HTTP request to a destination on the bound private network.
The private destination, as a URL, string, or Request.
Optionaloptions: RequestInit
Standard request options.
The response from the private service.
The runtime shape of a VPC Network binding.
Remarks
This interface is a stand-in, and should be deleted rather than maintained. Every other binding type this package wraps comes from
@cloudflare/workers-types—Fetcher,Queue,Workflow,Flagship. The pinned version of that package declares nothing for Workers VPC, which is still in beta, so this is the one shape the package describes itself.Declaring it is deliberate but not free. A hand-written type cannot be checked against the runtime, so if Cloudflare changes the surface before general availability this compiles happily and fails in production. When
@cloudflare/workers-typesships the real type, this file goes and the accessor imports it instead — a change that costs one import and a major version only if the shapes disagree.Kept to exactly the two documented methods for that reason. A smaller invented surface is a smaller thing to be wrong about.
VpcServiceBindingneeds no equivalent: a VPC Service binding offersfetchalone, which isFetcherstructurally, so it names a real type.Since
1.3.0