Documentation
¶
Overview ¶
Package ports displays Brev-managed public port mappings for an instance or external node.
Index ¶
- func NewCmdClosePort(portStore Store) *cobra.Command
- func NewCmdCreatePort(portStore Store) *cobra.Command
- func NewCmdPorts(portStore Store) *cobra.Command
- func NewCmdPortsLs(portStore Store) *cobra.Command
- func NewCmdUpdatePort(portStore Store) *cobra.Command
- func Open(ctx context.Context, out io.Writer, portStore Store, nameOrID string, ...) error
- func OpenHTTP(ctx context.Context, out io.Writer, portStore Store, nameOrID string, ...) error
- func Run(ctx context.Context, out io.Writer, portStore Store, nameOrID string, ...) error
- type PortInfo
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCmdClosePort ¶
NewCmdClosePort creates the `brev ports close` command.
func NewCmdCreatePort ¶
NewCmdCreatePort creates the `brev ports create` command.
func NewCmdPorts ¶
NewCmdPorts creates the `brev ports` command group.
func NewCmdPortsLs ¶
NewCmdPortsLs creates the `brev ports ls` command.
func NewCmdUpdatePort ¶
NewCmdUpdatePort creates the `brev ports update` command.
func Open ¶
func Open( ctx context.Context, out io.Writer, portStore Store, nameOrID string, portNumber int32, protocol devplanev1.PortProtocol, allowedSources []string, jsonOutput bool, ) error
Open resolves a managed instance or registered compute node and opens a port.
func OpenHTTP ¶
func OpenHTTP( ctx context.Context, out io.Writer, portStore Store, nameOrID string, portNumber int32, httpProtocol devplanev1.HttpPortProtocol, customHostname string, authorizedEmails []string, allowPublicUnauthenticated bool, jsonOutput bool, ) error
OpenHTTP resolves a managed instance or registered compute node and creates an authenticated or public HTTP application endpoint.
Types ¶
type PortInfo ¶
type PortInfo struct {
PortID string `json:"port_id"`
Endpoint string `json:"endpoint"`
PublicPort int32 `json:"public_port"`
DestinationPort int32 `json:"destination_port"`
Protocol string `json:"protocol"`
AllowedSources []string `json:"allowed_sources"`
AuthorizedEmails []string `json:"authorized_emails"`
AllowPublicUnauthenticated bool `json:"allow_public_unauthenticated"`
Type string `json:"type"`
// contains filtered or unexported fields
}
PortInfo is the stable JSON representation of a port mapping.
type Store ¶
type Store interface {
cmdutil.WorkspaceOrNodeResolver
}
Store contains the dependencies needed to resolve both managed instances and registered compute nodes.