ingress

package
v0.5.61 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const TypeIngress string = "ingress"

TypeIngress is the resource string for the type

Variables

This section is empty.

Functions

This section is empty.

Types

type Ingress

type Ingress struct {
	types.ResourceMetadata `hcl:",remain"`

	// local port to expose the service on
	Port int `hcl:"port" json:"port"`

	// Are we exposing a local serve to the target
	// if
	ExposeLocal bool `hcl:"expose_local,optional" json:"expose_local"`

	// details for the destination service
	Target TrafficTarget `hcl:"target,block" json:"target"`

	// path to open in the browser
	OpenInBrowser string `hcl:"open_in_browser,optional" json:"open_in_browser,omitempty"`

	// IngressId stores the ID of the created connector service
	IngressID string `hcl:"ingress_id,optional" json:"ingress_id,omitempty"`

	// LocalAddress is the fully qualified uri for accessing the resource from
	// the local machine
	LocalAddress string `hcl:"local_address,optional" json:"local_address,omitempty"`

	// RemoteAddress is the fully qualified uri for accessing the resource
	// in the remote machine
	RemoteAddress string `hcl:"remote_address,optional" json:"remote_address,omitempty"`
}

Ingress defines an ingress service mapping ports between local host and resources like containers and kube cluster

func (*Ingress) Process

func (i *Ingress) Process() error

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

Ingress defines a provider for handling connection ingress for a cluster

func (*Provider) Changed

func (p *Provider) Changed() (bool, error)

func (*Provider) Create

func (p *Provider) Create() error

func (*Provider) Destroy

func (p *Provider) Destroy() error

Destroy satisfies the interface method but is not implemented by LocalExec

func (*Provider) Init

func (p *Provider) Init(cfg htypes.Resource, l sdk.Logger) error

func (*Provider) Lookup

func (p *Provider) Lookup() ([]string, error)

Lookup satisfies the interface method but is not implemented by LocalExec

func (*Provider) Refresh

func (p *Provider) Refresh() error

type TargetConfig

type TargetConfig struct {
	ResourceName  string `hcl:"resource_name,optional" json:"resource_name,omitempty"`
	ResourceType  string `hcl:"resource_type,optional" json:"resource_type,omitempty"`
	ExternalIP    string `hcl:"external_ip,optional" json:"external_ip,omitempty"`
	ConnectorPort int    `hcl:"connector_port,optional" json:"connector_port,omitempty"`
}

type TrafficTarget

type TrafficTarget struct {
	Resource TargetConfig `hcl:"resource" json:"resource,omitempty"`

	Port      int    `hcl:"port,optional" json:"port,omitempty"`
	NamedPort string `hcl:"named_port,optional" json:"named_port,omitempty"`

	// Config is an collection which has driver specific content
	Config map[string]string `hcl:"config" json:"config"`
}

Traffic defines either a source or a destination block for ingress traffic

Jump to

Keyboard shortcuts

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