services

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2024 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseService

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

BaseService is a base implementation of the Service interface

func (*BaseService) GetAddress

func (s *BaseService) GetAddress() string

GetAddress returns the current address of the service

func (*BaseService) GetName

func (s *BaseService) GetName() string

GetName returns the current name of the service

func (*BaseService) Initialize

func (s *BaseService) Initialize() error

Initialize is a no-op for the Service interface

func (*BaseService) SetAddress

func (s *BaseService) SetAddress(address string) error

SetAddress sets the address if it is a valid IPv4 address

func (*BaseService) SetName

func (s *BaseService) SetName(name string)

SetName sets the name of the service

func (*BaseService) WriteConfig

func (s *BaseService) WriteConfig() error

WriteConfig is a no-op for the Service interface

type DNSService

type DNSService struct {
	BaseService
	// contains filtered or unexported fields
}

DNSService handles DNS configuration

func NewDNSService

func NewDNSService(injector di.Injector) *DNSService

NewDNSService creates a new DNSService

func (*DNSService) GetComposeConfig

func (s *DNSService) GetComposeConfig() (*types.Config, error)

GetComposeConfig returns the compose configuration

func (*DNSService) Initialize

func (s *DNSService) Initialize() error

Initialize resolves and sets all the things resolved from the DI

func (*DNSService) SetAddress

func (s *DNSService) SetAddress(address string) error

SetAddress sets the address for the DNS service

func (*DNSService) WriteConfig

func (s *DNSService) WriteConfig() error

WriteConfig writes any necessary configuration files needed by the service

type GitLivereloadService

type GitLivereloadService struct {
	BaseService
}

GitLivereloadService is a service struct that provides various utility functions

func NewGitLivereloadService

func NewGitLivereloadService(injector di.Injector) *GitLivereloadService

NewGitLivereloadService is a constructor for GitLivereloadService

func (*GitLivereloadService) GetComposeConfig

func (s *GitLivereloadService) GetComposeConfig() (*types.Config, error)

GetComposeConfig returns the top-level compose configuration including a list of container data for docker-compose.

type LocalstackService

type LocalstackService struct {
	BaseService
}

LocalstackService is a service struct that provides Localstack-specific utility functions

func NewLocalstackService

func NewLocalstackService(injector di.Injector) *LocalstackService

NewLocalstackService is a constructor for LocalstackService

func (*LocalstackService) GetComposeConfig

func (s *LocalstackService) GetComposeConfig() (*types.Config, error)

GetComposeConfig returns the top-level compose configuration including a list of container data for docker-compose.

type MockService

type MockService struct {
	BaseService
	// GetComposeConfigFunc is a function that mocks the GetComposeConfig method
	GetComposeConfigFunc func() (*types.Config, error)
	// WriteConfigFunc is a function that mocks the WriteConfig method
	WriteConfigFunc func() error
	// SetAddressFunc is a function that mocks the SetAddress method
	SetAddressFunc func(address string) error
	// GetAddressFunc is a function that mocks the GetAddress method
	GetAddressFunc func() string
	// InitializeFunc is a function that mocks the Initialize method
	InitializeFunc func() error
	// SetNameFunc is a function that mocks the SetName method
	SetNameFunc func(name string)
	// GetNameFunc is a function that mocks the GetName method
	GetNameFunc func() string
}

MockService is a mock implementation of the Service interface

func NewMockService

func NewMockService() *MockService

NewMockService is a constructor for MockService

func (*MockService) GetAddress

func (m *MockService) GetAddress() string

GetAddress calls the mock GetAddressFunc if it is set, otherwise returns an empty string

func (*MockService) GetComposeConfig

func (m *MockService) GetComposeConfig() (*types.Config, error)

GetComposeConfig calls the mock GetComposeConfigFunc if it is set, otherwise returns nil

func (*MockService) GetName

func (m *MockService) GetName() string

GetName calls the mock GetNameFunc if it is set, otherwise returns an empty string

func (*MockService) Initialize

func (m *MockService) Initialize() error

Initialize calls the mock InitializeFunc if it is set, otherwise returns nil

func (*MockService) SetAddress

func (m *MockService) SetAddress(address string) error

SetAddress calls the mock SetAddressFunc if it is set, otherwise returns nil

func (*MockService) SetName

func (m *MockService) SetName(name string)

SetName calls the mock SetNameFunc if it is set

func (*MockService) WriteConfig

func (m *MockService) WriteConfig() error

WriteConfig calls the mock WriteConfigFunc if it is set, otherwise returns nil

type RegistryService

type RegistryService struct {
	BaseService
}

RegistryService is a service struct that provides Registry-specific utility functions

func NewRegistryService

func NewRegistryService(injector di.Injector) *RegistryService

NewRegistryService is a constructor for RegistryService

func (*RegistryService) GetComposeConfig

func (s *RegistryService) GetComposeConfig() (*types.Config, error)

GetComposeConfig returns a compose configuration for the registry matching the current s.name value.

func (*RegistryService) SetAddress

func (s *RegistryService) SetAddress(address string) error

SetAddress establishes additional address information for the registry service

type Service

type Service interface {
	// GetComposeConfig returns the top-level compose configuration including a list of container data for docker-compose.
	GetComposeConfig() (*types.Config, error)

	// WriteConfig writes any necessary configuration files needed by the service
	WriteConfig() error

	// SetAddress sets the address if it is a valid IPv4 address
	SetAddress(address string) error

	// GetAddress returns the current address of the service
	GetAddress() string

	// SetName sets the name of the service
	SetName(name string)

	// GetName returns the current name of the service
	GetName() string

	// Initialize performs any necessary initialization for the service.
	Initialize() error
}

Service is an interface that defines methods for retrieving environment variables and can be implemented for individual providers.

type TalosControlPlaneService

type TalosControlPlaneService struct {
	BaseService
}

func NewTalosControlPlaneService

func NewTalosControlPlaneService(injector di.Injector) *TalosControlPlaneService

NewTalosControlPlaneService is a constructor for TalosControlPlaneService

func (*TalosControlPlaneService) GetComposeConfig

func (s *TalosControlPlaneService) GetComposeConfig() (*types.Config, error)

GetComposeConfig returns a list of container data for docker-compose.

func (*TalosControlPlaneService) SetAddress

func (s *TalosControlPlaneService) SetAddress(address string) error

SetAddress sets the address of the service This turns out to be a convenient place to set node information

type TalosWorkerService

type TalosWorkerService struct {
	BaseService
}

func NewTalosWorkerService

func NewTalosWorkerService(injector di.Injector) *TalosWorkerService

NewTalosWorkerService is a constructor for TalosWorkerService

func (*TalosWorkerService) GetComposeConfig

func (s *TalosWorkerService) GetComposeConfig() (*types.Config, error)

GetComposeConfig returns a list of container data for docker-compose.

func (*TalosWorkerService) SetAddress

func (s *TalosWorkerService) SetAddress(address string) error

SetAddress sets the address of the service This turns out to be a convenient place to set node information

Jump to

Keyboard shortcuts

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