Documentation ¶
Index ¶
- func NewConfigLoader(data string) ports.ConfigLoader
- func NewPrimaryAdapter() primary.PrimaryPort
- func NewPrimaryHandler(numTask int) domain.PrimaryAdapterHandler
- func NewSecondaryAdapter(name string, duration time.Duration, failCount int) secondary.SecodaryPort
- func NewSecondaryAdapterClient() secondary.SecondaryAdapterClient
- type ConfigLoaderMock
- type PrimaryAdapterMock
- type SecondaryAdapterClientMock
- type SecondaryAdapterMock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConfigLoader ¶
func NewConfigLoader(data string) ports.ConfigLoader
func NewPrimaryAdapter ¶
func NewPrimaryAdapter() primary.PrimaryPort
NewPrimaryAdapter returns mocked ports.PrimaryPort
func NewPrimaryHandler ¶
func NewPrimaryHandler(numTask int) domain.PrimaryAdapterHandler
NewPrimaryHandler returns mocked ports.PrimaryHandler with given number of tasks
func NewSecondaryAdapter ¶
NewSecondaryAdapter creates mocked implementation of ports.SecondaryPort
func NewSecondaryAdapterClient ¶
func NewSecondaryAdapterClient() secondary.SecondaryAdapterClient
Types ¶
type ConfigLoaderMock ¶
type ConfigLoaderMock struct {
// contains filtered or unexported fields
}
ConfigLoaderMock should implement ConfigLoader from `github.com/hanapedia/hexagon/internal/config/application/ports`
func (ConfigLoaderMock) Load ¶
func (clm ConfigLoaderMock) Load() (*model.ServiceUnitConfig, error)
Load for mock config loader does not validate cofiguration for separation of concerns
func (ConfigLoaderMock) LoadClusterConfig ¶
func (clm ConfigLoaderMock) LoadClusterConfig() (*model.ClusterConfig, error)
type PrimaryAdapterMock ¶
type PrimaryAdapterMock struct {
// contains filtered or unexported fields
}
func (PrimaryAdapterMock) Register ¶
func (pam PrimaryAdapterMock) Register(primaryHander *domain.PrimaryAdapterHandler) error
Register mock implementation
type SecondaryAdapterClientMock ¶
type SecondaryAdapterClientMock struct {
// contains filtered or unexported fields
}
func (SecondaryAdapterClientMock) Close ¶
func (sacm SecondaryAdapterClientMock) Close()
Close mock implementation
type SecondaryAdapterMock ¶
type SecondaryAdapterMock struct { secondary.SecondaryPortBase // contains filtered or unexported fields }
SecondaryAdapterMock should mock SecodaryPort from "github.com/hanapedia/hexagon/internal/service-unit/application/ports"
func (*SecondaryAdapterMock) Call ¶
func (sacm *SecondaryAdapterMock) Call(ctx context.Context) secondary.SecondaryPortCallResult
Call mock implementation
Click to show internal directories.
Click to hide internal directories.