ResourceWithEndpoints
Represents a resource that has endpoints associated with it.
type ResourceWithEndpoints interface{}Methods
A marker interface declares no methods of its own in Go. Its functions are declared on the concrete types they apply to.
AsHttp2Service() ResourceWithEndpointsReturns
ResourceWithEndpoints The resource builder.
Returns a handle; failures surface later via Err().
GetEndpoint GetEndpoint(name string) EndpointReferenceParameters
namestringThe name of the endpoint.Returns
EndpointReference An Endpoint that can be used to resolve the address of the endpoint after resource allocation has occurred.
Returns a handle; failures surface later via Err().
OnResourceEndpointsAllocated(callback func(arg ResourceEndpointsAllocatedEvent)) ResourceWithEndpointsParameters
callbackfunc(arg ResourceEndpointsAllocatedEvent) callbackThe callback to invoke when the event fires.Returns
ResourceWithEndpoints The resource builder.
Returns a handle; failures surface later via Err().
WithEndpoint(options ...*WithEndpointOptions) ResourceWithEndpointsParameters
options...*WithEndpointOptions Optional settings, described under Options.Options
Optional parameters are passed in a trailing options ...*WithEndpointOptions argument.
Port*float64An optional port. This is the port that will be given to other resource to communicate with this resource.TargetPort *float64This is the port the resource is listening on. If the endpoint is used for the container, it is the container port.Scheme*stringAn optional scheme e.g. (http/https). Defaults to the protocol argument if it is defined or "tcp" otherwise.Name*stringAn optional name of the endpoint. Defaults to the scheme name if not specified.Env*stringAn optional name of the environment variable that will be used to inject the targetPort . If the target port is null one will be dynamically generated and assigned to the environment variable.IsProxied *boolSpecifies if the endpoint will be proxied by DCP. Defaults to null.IsExternal *boolIndicates that this endpoint should be exposed externally at publish time.Protocol*ProtocolType Network protocol: TCP or UDP are supported today, others possibly in future.Returns
ResourceWithEndpoints The resource builder.
Returns a handle; failures surface later via Err().
WithEndpointCallback( endpointName string, callback func(obj EndpointUpdateContext), options ...*WithEndpointCallbackOptions,) ResourceWithEndpointsParameters
endpointName stringcallbackfunc(obj EndpointUpdateContext) callbackoptions...*WithEndpointCallbackOptions Optional settings, described under Options.Options
Optional parameters are passed in a trailing options ...*WithEndpointCallbackOptions argument.
CreateIfNotExists *boolReturns
ResourceWithEndpoints Returns a handle; failures surface later via Err().
false, endpoints belonging to the resource will ignore the configured proxy settings and run proxy-less.WithEndpointProxySupport(proxyEnabled bool) ResourceWithEndpointsParameters
proxyEnabled boolShould endpoints for the resource support using a proxy?Returns
ResourceWithEndpoints The resource builder.
Returns a handle; failures surface later via Err().
WithExternalHttpEndpoints() ResourceWithEndpointsReturns
ResourceWithEndpoints The resource builder.
Returns a handle; failures surface later via Err().
WithHttpCommand( path string, displayName string, options ...*HttpCommandExportOptions,) ResourceWithEndpointsParameters
pathstringdisplayName stringoptions...*HttpCommandExportOptions Optional settings, described under Options.Options
Optional parameters are passed as the existing *HttpCommandExportOptions struct.
Returns
ResourceWithEndpoints Returns a handle; failures surface later via Err().
WithHttpEndpoint(options ...*WithHttpEndpointOptions) ResourceWithEndpointsParameters
options...*WithHttpEndpointOptions Optional settings, described under Options.Options
Optional parameters are passed in a trailing options ...*WithHttpEndpointOptions argument.
Port*float64An optional port. This is the port that will be given to other resource to communicate with this resource.TargetPort *float64This is the port the resource is listening on. If the endpoint is used for the container, it is the container port.Name*stringAn optional name of the endpoint. Defaults to "http" if not specified.Env*stringAn optional name of the environment variable to inject.IsProxied *boolSpecifies if the endpoint will be proxied by DCP. Defaults to null.Returns
ResourceWithEndpoints The resource builder.
Returns a handle; failures surface later via Err().
WithHttpEndpointCallback( callback func(obj EndpointUpdateContext), options ...*WithHttpEndpointCallbackOptions,) ResourceWithEndpointsParameters
callbackfunc(obj EndpointUpdateContext) callbackoptions...*WithHttpEndpointCallbackOptions Optional settings, described under Options.Options
Optional parameters are passed in a trailing options ...*WithHttpEndpointCallbackOptions argument.
Name*stringCreateIfNotExists *boolReturns
ResourceWithEndpoints Returns a handle; failures surface later via Err().
WithHttpHealthCheck(options ...*WithHttpHealthCheckOptions) ResourceWithEndpointsParameters
options...*WithHttpHealthCheckOptions Optional settings, described under Options.Options
Optional parameters are passed in a trailing options ...*WithHttpHealthCheckOptions argument.
Path*stringThe relative path to test.StatusCode *float64The result code to interpret as healthy.EndpointName *stringThe name of the endpoint to derive the base address from.Returns
ResourceWithEndpoints The resource builder.
Returns a handle; failures surface later via Err().
WithHttpProbe( probeType ProbeType, options ...*WithHttpProbeOptions,) ResourceWithEndpointsParameters
probeType ProbeType options...*WithHttpProbeOptions Optional settings, described under Options.Options
Optional parameters are passed in a trailing options ...*WithHttpProbeOptions argument.
Path*stringInitialDelaySeconds *float64PeriodSeconds *float64TimeoutSeconds *float64FailureThreshold *float64SuccessThreshold *float64EndpointName *stringReturns
ResourceWithEndpoints Returns a handle; failures surface later via Err().
WithHttpsEndpoint(options ...*WithHttpsEndpointOptions) ResourceWithEndpointsParameters
options...*WithHttpsEndpointOptions Optional settings, described under Options.Options
Optional parameters are passed in a trailing options ...*WithHttpsEndpointOptions argument.
Port*float64An optional host port.TargetPort *float64This is the port the resource is listening on. If the endpoint is used for the container, it is the container port.Name*stringAn optional name of the endpoint. Defaults to "https" if not specified.Env*stringAn optional name of the environment variable to inject.IsProxied *boolSpecifies if the endpoint will be proxied by DCP. Defaults to null.Returns
ResourceWithEndpoints The resource builder.
Returns a handle; failures surface later via Err().
WithHttpsEndpointCallback( callback func(obj EndpointUpdateContext), options ...*WithHttpsEndpointCallbackOptions,) ResourceWithEndpointsParameters
callbackfunc(obj EndpointUpdateContext) callbackoptions...*WithHttpsEndpointCallbackOptions Optional settings, described under Options.Options
Optional parameters are passed in a trailing options ...*WithHttpsEndpointCallbackOptions argument.
Name*stringCreateIfNotExists *boolReturns
ResourceWithEndpoints Returns a handle; failures surface later via Err().
WithMcpServer(options ...*WithMcpServerOptions) ResourceWithEndpointsParameters
options...*WithMcpServerOptions Optional settings, described under Options.Options
Optional parameters are passed in a trailing options ...*WithMcpServerOptions argument.
Path*stringAn optional path to append to the endpoint URL when forming the MCP server address. Defaults to "/mcp".EndpointName *stringAn optional name of the endpoint that hosts the MCP server. If not specified, defaults to the first HTTPS or HTTP endpoint.Returns
ResourceWithEndpoints The resource builder.
Returns a handle; failures surface later via Err().
Applies to
This interface applies to the following types: