services

package
v0.0.0-...-1429f03 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SshUserName string = "pulumi-baremetal"
	SshPassword string = "Password!123"
	SshPort     int    = 2222
)

Variables

This section is empty.

Functions

func FileExists

func FileExists(ctx context.Context, ctr tc.Container, path string) (bool, error)

Types

type Host

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

func (*Host) ConnectionDetails

func (h *Host) ConnectionDetails(ctx context.Context, internalPort string) (host string, port nat.Port, err error)

func (*Host) Ctr

func (h *Host) Ctr(ctx context.Context) (tc.Container, error)

func (*Host) Exec

func (h *Host) Exec(ctx context.Context, args ...string) (string, error)

Exec implements TestHost.

func (*Host) FileExists

func (h *Host) FileExists(ctx context.Context, path string) (bool, error)

FileExists implements TestHost.

func (*Host) Ip

func (h *Host) Ip(ctx context.Context) (string, error)

Ip implements TestHost.

func (*Host) ReadFile

func (h *Host) ReadFile(ctx context.Context, path string) ([]byte, error)

ReadFile implements TestHost.

func (*Host) Start

func (h *Host) Start(ctx context.Context) error

Start implements TestHost.

func (*Host) Stop

func (h *Host) Stop(ctx context.Context) error

Stop implements TestHost.

func (*Host) WriteFile

func (h *Host) WriteFile(ctx context.Context, path string, data []byte) error

WriteFile implements TestHost.

type HostCerts

type HostCerts struct {
	Bundle   util.CertBundle
	CaPath   string
	CertPath string
	KeyPath  string
}

type Provisioner

type Provisioner struct {
	Host

	Address string
	Port    string
	Certs   *util.CertBundle
}

func NewProvisioner

func NewProvisioner(
	port string,
	clientCa *tlscert.Certificate,
	logger io.Writer,
) (*Provisioner, error)

func (*Provisioner) Ca

func (p *Provisioner) Ca() *tlscert.Certificate

CertBundle implements TestProvisioner.

func (*Provisioner) ConnectionDetails

func (p *Provisioner) ConnectionDetails(ctx context.Context) (string, string, error)

ConnectionDetails implements TestProvisioner.

type Sshd

type Sshd struct{ Host }

func NewSshd

func NewSshd(ctx context.Context, logger io.Writer) (*Sshd, error)

func (*Sshd) ConnectionDetails

func (s *Sshd) ConnectionDetails(ctx context.Context) (string, nat.Port, error)

func (*Sshd) ConnectionProps

func (s *Sshd) ConnectionProps(ctx context.Context) (resource.PropertyValue, error)

Jump to

Keyboard shortcuts

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