Help us shape the future of Go! Take the 2026 Go Developer Survey

ociloadbalancer

package
v1.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2026 License: MIT Imports: 39 Imported by: 0

README

OCI Load Balancer

Parity grade: B · SDK github.com/oracle/oci-go-sdk/v65@v65.126.2 · last audited 2026-10-30 (aebf6f27d)

Coverage

Metric Value
PARITY entries audited 61 (57 ok, 4 partial)
Feature families 16 (5 ok, 11 partial)
Known gaps 9
Deferred items 0
Resource leaks unknown
Known gaps
  • Cipher suites ECDHE-RSA-AES128-SHA256 and ECDHE-ECDSA-AES128-SHA256 are accepted and stored by the control plane but not served by the data plane: Go classes them as insecure (tls.InsecureCipherSuites).
  • Not routed: CancelWorkRequest and tag/lock APIs; the shape catalogue is static. reservedIps, ipv6SubnetCidr and ipMode other than IPV4 are rejected.
  • Rejected with 400: IP_BASED_MAX_CONNECTIONS, SOURCE_VCN_ID and SOURCE_VCN_IP_ADDRESS conditions, areInvalidCharactersAllowed, backendTcpProxyProtocolVersion/Options, certificateIds and trustedCertificateAuthorityIds (OCI Certificates service), passphrase-protected private keys, TLS protocols below 1.2.
  • verifyPeerCertificate=false on a backend set does not turn verification off (repo rule: no InsecureSkipVerify); backends with self-signed certificates need their certificate uploaded as the bundle.
  • Unverified, from memory: flexible shape bounds (10-8000 Mbps), name character rules, retries/threshold semantics, health status aggregation, 409 code for in-flight work requests, listener port sharing by hostname, path route and rule precedence, ALLOW/REDIRECT multiple-condition semantics, header add semantics, HTTP 404 for non-matching virtual hosts, pathRouteSetName and routingPolicyName being mutually exclusive, the built-in cipher suite names, the routing-policy condition grammar subset.
  • Addresses: public and private load balancers get an address from the emulator pool 198.18.0.0/15 (public) or the OCI Core subnet CIDR when wired; no real address is reachable, the data plane is on loopback ephemeral ports only. In containers those ports are not published; use the endpoints admin route from inside the container.
  • Health state is not persisted; backend maxConnections and balancing cursors are per process. No PROXY protocol, no SNI-based backend selection, no OCSP or session-ticket handling, no per-listener access logging.
  • opc-retry-token idempotency, IAM policy checks, resource principals and instance principals are not applied; only API-key signatures are verified. Private keys of certificates are not persisted, so TLS listeners need the certificate recreated after a restore.
  • ociapigateway still carries its own copy of the loopback dial guard instead of pkgs/httpclient.LoopbackDialer.

More

Documentation

Index

Constants

View Source
const DefaultPort = 8165

DefaultPort is the dedicated control-plane listener's default TCP port.

View Source
const (
	// Region is the fixed region baked into emulated OCIDs.
	Region = "iad"
)

Variables

View Source
var ErrDestinationNotPermitted = errors.New(
	"ociloadbalancer: destination is outside loopback and external backends are not allowed",
)

ErrDestinationNotPermitted is returned when a backend resolves outside the permitted network range.

View Source
var ErrNilAppContext = errors.New("ociloadbalancer: nil app context")

ErrNilAppContext is returned when Init is called with a nil AppContext.

View Source
var ErrSnapshotNull = errors.New("ociloadbalancer: null entry in snapshot")

ErrSnapshotNull is returned when a snapshot contains a null entry.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	Code    string
	Message string
	Status  int
}

APIError is an OCI error response: HTTP status plus the `code` and `message` body fields.

func (*APIError) Error

func (e *APIError) Error() string

type Backend

type Backend struct {
	MaxConnections *int   `json:"maxConnections,omitempty"`
	Name           string `json:"name"`
	IPAddress      string `json:"ipAddress"`
	Port           int    `json:"port"`
	Weight         int    `json:"weight"`
	Drain          bool   `json:"drain"`
	Backup         bool   `json:"backup"`
	Offline        bool   `json:"offline"`
}

Backend is a backend server.

type BackendHealthWire

type BackendHealthWire struct {
	Status             string                  `json:"status"`
	HealthCheckResults []healthCheckResultWire `json:"healthCheckResults"`
}

BackendHealthWire is the wire form of a backend's health.

type BackendSet

type BackendSet struct {
	SSL                   *SSLConfig           `json:"sslConfiguration,omitempty"`
	SessionPersistence    *SessionPersistence  `json:"sessionPersistenceConfiguration,omitempty"`
	LBCookiePersistence   *LBCookiePersistence `json:"lbCookieSessionPersistenceConfiguration,omitempty"`
	BackendMaxConnections *int                 `json:"backendMaxConnections,omitempty"`
	Name                  string               `json:"name"`
	Policy                string               `json:"policy"`
	Backends              []Backend            `json:"backends"`
	HealthChecker         HealthChecker        `json:"healthChecker"`
}

BackendSet groups backends under one balancing policy and health check.

type BackendSetHealthWire

type BackendSetHealthWire struct {
	Status                    string   `json:"status"`
	WarningStateBackendNames  []string `json:"warningStateBackendNames"`
	CriticalStateBackendNames []string `json:"criticalStateBackendNames"`
	UnknownStateBackendNames  []string `json:"unknownStateBackendNames"`
	TotalBackendCount         int      `json:"totalBackendCount"`
}

BackendSetHealthWire is the wire form of a backend set's health.

type Certificate

type Certificate struct {
	Name   string `json:"certificateName"`
	Public string `json:"publicCertificate"`
	CA     string `json:"caCertificate"`
}

Certificate is a certificate bundle; its private key is held in memory only and never returned.

type ConfigProvider

type ConfigProvider interface {
	GetOCILoadBalancerSettings() Settings
}

ConfigProvider extracts OCI Load Balancer configuration from the AppContext Config.

type ConnectionConfig

type ConnectionConfig struct {
	BackendTCPProxyProtocolVersion *int     `json:"backendTcpProxyProtocolVersion,omitempty"`
	BackendTCPProxyProtocolOptions []string `json:"backendTcpProxyProtocolOptions,omitempty"`
	IdleTimeout                    int64    `json:"idleTimeout"`
}

ConnectionConfig tunes listener connections.

type Endpoint

type Endpoint struct {
	LoadBalancerID string `json:"loadBalancerId"`
	Listener       string `json:"listener"`
	Protocol       string `json:"protocol"`
	Address        string `json:"address"`
	Port           int    `json:"port"`
}

Endpoint is one serving data-plane listener.

type Handler

type Handler struct {
	Backend *InMemoryBackend

	Port        int
	EnforceAuth bool
	// contains filtered or unexported fields
}

Handler serves OCI Load Balancer: the control plane on its own listener; the backend runs the data plane.

func NewHandler

func NewHandler(backend *InMemoryBackend) *Handler

NewHandler creates a Handler; callers override Port and EnforceAuth from Settings.

func (*Handler) ExtractOperation

func (h *Handler) ExtractOperation(c *echo.Context) string

ExtractOperation returns the operation name for metrics.

func (*Handler) ExtractResource

func (h *Handler) ExtractResource(c *echo.Context) string

ExtractResource returns the addressed resource id for metrics.

func (*Handler) GetSupportedOperations

func (h *Handler) GetSupportedOperations() []string

GetSupportedOperations lists the supported operations.

func (*Handler) Handler

func (h *Handler) Handler() echo.HandlerFunc

Handler returns the Echo handler for all OCILoadBalancer requests.

func (*Handler) MatchPriority

func (h *Handler) MatchPriority() int

MatchPriority is irrelevant because RouteMatcher never matches.

func (*Handler) Name

func (h *Handler) Name() string

Name returns the service name.

func (*Handler) Reset

func (h *Handler) Reset()

Reset clears all in-memory state.

func (*Handler) Restore

func (h *Handler) Restore(ctx context.Context, data []byte) error

Restore implements persistence.Persistable by delegating to the backend.

func (*Handler) RouteMatcher

func (h *Handler) RouteMatcher() service.Matcher

RouteMatcher never matches: OCILoadBalancer runs on its own listener.

func (*Handler) Shutdown

func (h *Handler) Shutdown(ctx context.Context)

Shutdown stops the listener and the sweeper.

func (*Handler) Snapshot

func (h *Handler) Snapshot(ctx context.Context) []byte

Snapshot implements persistence.Persistable by delegating to the backend.

func (*Handler) StartWorker

func (h *Handler) StartWorker(ctx context.Context) error

StartWorker binds the dedicated listener synchronously so a port conflict is returned to the caller.

func (*Handler) Trusted

func (h *Handler) Trusted() echo.HandlerFunc

Trusted returns a handler that skips request-signature verification, for the in-process dashboard proxy.

type HealthChecker

type HealthChecker struct {
	Protocol          string `json:"protocol"`
	URLPath           string `json:"urlPath,omitempty"`
	ResponseBodyRegex string `json:"responseBodyRegex"`
	Port              int    `json:"port"`
	ReturnCode        int    `json:"returnCode"`
	Retries           int    `json:"retries"`
	TimeoutInMillis   int    `json:"timeoutInMillis"`
	IntervalInMillis  int    `json:"intervalInMillis"`
	IsForcePlainText  bool   `json:"isForcePlainText"`
}

HealthChecker is a backend set health check configuration.

type Hostname

type Hostname struct {
	Name     string `json:"name"`
	Hostname string `json:"hostname"`
}

Hostname is a virtual hostname.

type IPAddress

type IPAddress struct {
	ReservedIP *ReservedIP `json:"reservedIp,omitempty"`
	IPAddress  string      `json:"ipAddress"`
	IsPublic   bool        `json:"isPublic"`
}

IPAddress is an address assigned to a load balancer.

type IPMaxConnections

type IPMaxConnections struct {
	IPAddresses    []string `json:"ipAddresses"`
	MaxConnections int      `json:"maxConnections"`
}

IPMaxConnections caps connections for source addresses.

type InMemoryBackend

type InMemoryBackend struct {
	Auth *ociauth.Registry
	// contains filtered or unexported fields
}

InMemoryBackend holds every load balancer and work request under one lock.

func NewInMemoryBackend

func NewInMemoryBackend() *InMemoryBackend

NewInMemoryBackend creates an empty backend.

func (*InMemoryBackend) ChangeCompartment

func (b *InMemoryBackend) ChangeCompartment(id, ifMatch string, in changeCompartmentIn) (string, error)

ChangeCompartment moves a load balancer to another compartment.

func (*InMemoryBackend) Close

func (b *InMemoryBackend) Close()

Close stops every data-plane listener.

func (*InMemoryBackend) Compartments

func (b *InMemoryBackend) Compartments() []string

Compartments lists the distinct compartments that hold load balancers.

func (*InMemoryBackend) CreateLoadBalancer

func (b *InMemoryBackend) CreateLoadBalancer(in createLBIn) (string, error)

CreateLoadBalancer creates a load balancer in CREATING state and returns its work request id.

func (*InMemoryBackend) DeleteLoadBalancer

func (b *InMemoryBackend) DeleteLoadBalancer(id, ifMatch string) (string, error)

DeleteLoadBalancer starts deleting a load balancer.

func (*InMemoryBackend) Endpoints

func (b *InMemoryBackend) Endpoints() []Endpoint

Endpoints lists the loopback addresses the active listeners are reachable on.

func (*InMemoryBackend) GetLoadBalancer

func (b *InMemoryBackend) GetLoadBalancer(id string) (*LoadBalancerWire, string, error)

GetLoadBalancer returns one load balancer and its etag.

func (*InMemoryBackend) GetWorkRequest

func (b *InMemoryBackend) GetWorkRequest(id string) (WorkRequestWire, error)

GetWorkRequest returns one work request.

func (*InMemoryBackend) ListLoadBalancers

func (b *InMemoryBackend) ListLoadBalancers(
	compartment, name, state string, full bool, o ListOpts,
) (page.Page[*LoadBalancerWire], error)

ListLoadBalancers lists the load balancers of a compartment.

func (*InMemoryBackend) ListWorkRequests

func (b *InMemoryBackend) ListWorkRequests(lbID string, o ListOpts) (page.Page[WorkRequestWire], error)

ListWorkRequests lists the work requests of one load balancer, newest first.

func (*InMemoryBackend) ListenerTarget

func (b *InMemoryBackend) ListenerTarget(lbID, listener string) (Target, bool)

ListenerTarget returns the loopback data-plane address of a serving listener of an ACTIVE load balancer.

func (*InMemoryBackend) LoadBalancerState

func (b *InMemoryBackend) LoadBalancerState(id string) (string, bool)

LoadBalancerState returns the lifecycle state of a load balancer.

func (*InMemoryBackend) Mutate

func (b *InMemoryBackend) Mutate(
	id, ifMatch, wrType string, refConflict bool, fn func(lb *LoadBalancer) *APIError,
) (string, error)

Mutate applies fn to a copy of the load balancer, validates the result, publishes it and returns the id of the work request that tracks the change.

func (*InMemoryBackend) Read

func (b *InMemoryBackend) Read(id string, fn func(lb *LoadBalancer) *APIError) error

Read runs fn against a load balancer under the read lock.

func (*InMemoryBackend) RefreshHealth

func (b *InMemoryBackend) RefreshHealth(lbID, set string)

RefreshHealth runs every health check of a backend set that is due on the backend clock.

func (*InMemoryBackend) Reset

func (b *InMemoryBackend) Reset()

Reset clears all state and stops every data-plane listener.

func (*InMemoryBackend) Restore

func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error

Restore loads backend state from a snapshot and reopens the data-plane listeners of active load balancers.

func (*InMemoryBackend) SetAllowExternal

func (b *InMemoryBackend) SetAllowExternal(allow bool)

SetAllowExternal lets the data plane reach non-loopback backends.

func (*InMemoryBackend) SetClock

func (b *InMemoryBackend) SetClock(now func() time.Time)

SetClock injects the time source used for lifecycle transitions and health checks.

func (*InMemoryBackend) SetCompartmentChecker

func (b *InMemoryBackend) SetCompartmentChecker(fn func(string) bool)

SetCompartmentChecker validates compartmentId arguments against another service (OCI Identity).

func (*InMemoryBackend) SetSubnetResolver

func (b *InMemoryBackend) SetSubnetResolver(fn func(string) (string, bool))

SetSubnetResolver validates subnetIds against another service (OCI Core) and returns each subnet's CIDR.

func (*InMemoryBackend) SetTransition

func (b *InMemoryBackend) SetTransition(d time.Duration)

SetTransition sets how long asynchronous operations take to complete.

func (*InMemoryBackend) Snapshot

func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte

Snapshot serialises the backend state, including registered API keys. TLS private keys are never persisted.

func (*InMemoryBackend) Sweep

func (b *InMemoryBackend) Sweep()

Sweep applies lifecycle transitions against the backend clock and reconciles data-plane listeners.

func (*InMemoryBackend) UpdateLoadBalancer

func (b *InMemoryBackend) UpdateLoadBalancer(id, ifMatch string, in updateLBIn) (string, error)

UpdateLoadBalancer changes mutable load balancer properties.

func (*InMemoryBackend) UpdateNSGs

func (b *InMemoryBackend) UpdateNSGs(id, ifMatch string, in nsgIn) (string, error)

UpdateNSGs replaces the network security groups.

func (*InMemoryBackend) UpdateShape

func (b *InMemoryBackend) UpdateShape(id, ifMatch string, in updateShapeIn) (string, error)

UpdateShape changes the load balancer shape.

type LBCookiePersistence

type LBCookiePersistence struct {
	DisableFallback *bool  `json:"disableFallback,omitempty"`
	MaxAgeInSeconds *int   `json:"maxAgeInSeconds,omitempty"`
	IsSecure        *bool  `json:"isSecure,omitempty"`
	IsHTTPOnly      *bool  `json:"isHttpOnly,omitempty"`
	CookieName      string `json:"cookieName,omitempty"`
	Domain          string `json:"domain,omitempty"`
	Path            string `json:"path,omitempty"`
}

LBCookiePersistence is load-balancer-inserted cookie session persistence.

type ListOpts

type ListOpts struct {
	SortBy string
	Order  string
	Page   string
	Limit  int
}

ListOpts carries the shared list query parameters.

type Listener

type Listener struct {
	SSL        *SSLConfig        `json:"sslConfiguration,omitempty"`
	Connection *ConnectionConfig `json:"connectionConfiguration,omitempty"`
	Name       string            `json:"name"`
	DefaultSet string            `json:"defaultBackendSetName"`
	Protocol   string            `json:"protocol"`
	PathRoutes string            `json:"pathRouteSetName,omitempty"`
	Policy     string            `json:"routingPolicyName,omitempty"`
	Address    string            `json:"gopherstackAddress,omitempty"`
	Hostnames  []string          `json:"hostnameNames,omitempty"`
	RuleSets   []string          `json:"ruleSetNames,omitempty"`
	Port       int               `json:"port"`
}

Listener accepts client connections.

type LoadBalancer

type LoadBalancer struct {
	Tags
	TimeCreated     time.Time                  `json:"timeCreated"`
	BusyUntil       time.Time                  `json:"busyUntil,omitzero"`
	ShapeDetails    *ShapeDetails              `json:"shapeDetails,omitempty"`
	TransitionAt    *time.Time                 `json:"transitionAt,omitempty"`
	Listeners       map[string]*Listener       `json:"listeners,omitempty"`
	Hostnames       map[string]*Hostname       `json:"hostnames,omitempty"`
	SSLCipherSuites map[string]*SSLCipherSuite `json:"sslCipherSuites,omitempty"`
	Certificates    map[string]*Certificate    `json:"certificates,omitempty"`
	BackendSets     map[string]*BackendSet     `json:"backendSets,omitempty"`
	PathRouteSets   map[string]*PathRouteSet   `json:"pathRouteSets,omitempty"`
	RuleSets        map[string]*RuleSet        `json:"ruleSets,omitempty"`
	RoutingPolicies map[string]*RoutingPolicy  `json:"routingPolicies,omitempty"`
	ID              string                     `json:"id"`
	CompartmentID   string                     `json:"compartmentId"`
	DisplayName     string                     `json:"displayName"`
	State           string                     `json:"lifecycleState"`
	ShapeName       string                     `json:"shapeName"`
	IPMode          string                     `json:"ipMode,omitempty"`
	RequestIDHeader string                     `json:"requestIdHeader,omitempty"`
	Etag            string                     `json:"etag,omitempty"`
	SubnetIDs       []string                   `json:"subnetIds"`
	NSGs            []string                   `json:"networkSecurityGroupIds"`
	IPAddresses     []IPAddress                `json:"ipAddresses"`
	IsPrivate       bool                       `json:"isPrivate"`
	DeleteProtected bool                       `json:"isDeleteProtectionEnabled"`
	RequestIDOn     bool                       `json:"isRequestIdEnabled"`
}

LoadBalancer is a load balancer with all of its sub-resources.

type LoadBalancerHealthWire

type LoadBalancerHealthWire struct {
	Status                       string   `json:"status"`
	WarningStateBackendSetNames  []string `json:"warningStateBackendSetNames"`
	CriticalStateBackendSetNames []string `json:"criticalStateBackendSetNames"`
	UnknownStateBackendSetNames  []string `json:"unknownStateBackendSetNames"`
	TotalBackendSetCount         int      `json:"totalBackendSetCount"`
}

LoadBalancerHealthWire is the wire form of a load balancer's health.

type LoadBalancerWire

type LoadBalancerWire = LoadBalancer

LoadBalancerWire is the wire form of a load balancer.

type MatchType

type MatchType struct {
	MatchType string `json:"matchType"`
}

MatchType is a path match type wrapper.

type PathRoute

type PathRoute struct {
	Path           string    `json:"path"`
	BackendSetName string    `json:"backendSetName"`
	PathMatchType  MatchType `json:"pathMatchType"`
}

PathRoute routes a path to a backend set.

type PathRouteSet

type PathRouteSet struct {
	Name       string      `json:"name"`
	PathRoutes []PathRoute `json:"pathRoutes"`
}

PathRouteSet is an ordered list of path routes.

type Provider

type Provider struct{}

Provider implements service.Provider for OCI Load Balancer. It runs on its own listener (see Handler.StartWorker) and never matches on the shared AWS router.

func (*Provider) Init

Init creates the backend and handler; the port is bound in StartWorker.

func (*Provider) Name

func (p *Provider) Name() string

Name returns the service provider name.

type RedirectURI

type RedirectURI struct {
	Protocol *string `json:"protocol,omitempty"`
	Host     *string `json:"host,omitempty"`
	Port     *int    `json:"port,omitempty"`
	Path     *string `json:"path,omitempty"`
	Query    *string `json:"query,omitempty"`
}

RedirectURI is the target of a REDIRECT rule.

type ReservedIP

type ReservedIP struct {
	ID string `json:"id,omitempty"`
}

ReservedIP references a reserved public IP.

type RoutingAction

type RoutingAction struct {
	Name           string `json:"name"`
	BackendSetName string `json:"backendSetName"`
}

RoutingAction is a routing rule action.

type RoutingPolicy

type RoutingPolicy struct {
	Name                     string        `json:"name"`
	ConditionLanguageVersion string        `json:"conditionLanguageVersion"`
	Rules                    []RoutingRule `json:"rules"`
}

RoutingPolicy is an ordered list of routing rules.

type RoutingRule

type RoutingRule struct {
	Name      string          `json:"name"`
	Condition string          `json:"condition"`
	Actions   []RoutingAction `json:"actions"`
}

RoutingRule is a conditional routing rule.

type Rule

type Rule struct {
	ResponseCode          *int               `json:"responseCode,omitempty"`
	StatusCode            *int               `json:"statusCode,omitempty"`
	RedirectURI           *RedirectURI       `json:"redirectUri,omitempty"`
	DefaultMaxConnections *int               `json:"defaultMaxConnections,omitempty"`
	HTTPLargeHeaderSizeKB *int               `json:"httpLargeHeaderSizeInKB,omitempty"`
	InvalidCharsAllowed   *bool              `json:"areInvalidCharactersAllowed,omitempty"`
	Prefix                *string            `json:"prefix,omitempty"`
	Suffix                *string            `json:"suffix,omitempty"`
	Description           *string            `json:"description,omitempty"`
	Action                string             `json:"action"`
	Header                string             `json:"header,omitempty"`
	Value                 *string            `json:"value,omitempty"`
	Conditions            []RuleCondition    `json:"conditions,omitempty"`
	AllowedMethods        []string           `json:"allowedMethods,omitempty"`
	IPMaxConnections      []IPMaxConnections `json:"ipMaxConnections,omitempty"`
}

Rule is one rule set item; the fields in use depend on Action.

type RuleCondition

type RuleCondition struct {
	AttributeName  string `json:"attributeName"`
	AttributeValue string `json:"attributeValue"`
	Operator       string `json:"operator,omitempty"`
}

RuleCondition is a rule match condition.

type RuleSet

type RuleSet struct {
	Name  string `json:"name"`
	Items []Rule `json:"items"`
}

RuleSet is an ordered list of rules.

type SSLCipherSuite

type SSLCipherSuite struct {
	Name    string   `json:"name"`
	Ciphers []string `json:"ciphers"`
}

SSLCipherSuite is a custom cipher suite.

type SSLConfig

type SSLConfig struct {
	VerifyDepth                    *int     `json:"verifyDepth,omitempty"`
	VerifyPeerCertificate          *bool    `json:"verifyPeerCertificate,omitempty"`
	HasSessionResumption           *bool    `json:"hasSessionResumption,omitempty"`
	CertificateName                string   `json:"certificateName,omitempty"`
	CipherSuiteName                string   `json:"cipherSuiteName,omitempty"`
	ServerOrderPreference          string   `json:"serverOrderPreference,omitempty"`
	TrustedCertificateAuthorityIDs []string `json:"trustedCertificateAuthorityIds,omitempty"`
	CertificateIDs                 []string `json:"certificateIds,omitempty"`
	Protocols                      []string `json:"protocols,omitempty"`
}

SSLConfig is a listener or backend set TLS configuration.

type SessionPersistence

type SessionPersistence struct {
	DisableFallback *bool  `json:"disableFallback,omitempty"`
	CookieName      string `json:"cookieName"`
}

SessionPersistence is application-cookie session persistence.

type Settings

type Settings struct {
	Port int `` //nolint:lll // config struct tags are intentionally verbose
	/* 238-byte string literal not displayed */
	EnforceAuth bool `` //nolint:lll // config struct tags are intentionally verbose
	/* 273-byte string literal not displayed */
	AllowExternalBackend bool `` //nolint:lll // config struct tags are intentionally verbose
	/* 270-byte string literal not displayed */
}

Settings holds service-level configuration, embedded in the root CLI as CLI.OCILoadBalancer.

func DefaultSettings

func DefaultSettings() Settings

DefaultSettings returns the settings used when no ConfigProvider is available.

type ShapeDetails

type ShapeDetails struct {
	Minimum int `json:"minimumBandwidthInMbps"`
	Maximum int `json:"maximumBandwidthInMbps"`
}

ShapeDetails are the flexible-shape bandwidth bounds in Mbps.

type Tags

type Tags struct {
	FreeformTags       map[string]string         `json:"freeformTags,omitempty"`
	DefinedTags        map[string]map[string]any `json:"definedTags,omitempty"`
	SecurityAttributes map[string]map[string]any `json:"securityAttributes,omitempty"`
}

Tags are the shared tag sets of a load balancer.

type Target

type Target struct {
	Address  string
	Protocol string
	TLS      bool
}

Target is the data-plane endpoint of a serving listener.

type WorkRequest

type WorkRequest struct {
	Accepted       time.Time `json:"accepted"`
	FinishAt       time.Time `json:"finishAt"`
	ID             string    `json:"id"`
	LoadBalancerID string    `json:"loadBalancerId"`
	CompartmentID  string    `json:"compartmentId"`
	Type           string    `json:"type"`
	Seq            int64     `json:"seq"`
}

WorkRequest records an asynchronous load balancer operation.

type WorkRequestWire

type WorkRequestWire struct {
	TimeAccepted   time.Time  `json:"timeAccepted"`
	TimeFinished   *time.Time `json:"timeFinished,omitempty"`
	ID             string     `json:"id"`
	LoadBalancerID string     `json:"loadBalancerId"`
	CompartmentID  string     `json:"compartmentId,omitempty"`
	Type           string     `json:"type"`
	LifecycleState string     `json:"lifecycleState"`
	Message        string     `json:"message"`
	ErrorDetails   []struct{} `json:"errorDetails"`
}

WorkRequestWire is the wire form of a work request.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL