services

package
v0.0.0-...-7d4d207 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EC2Handler

type EC2Handler struct {
}

func (*EC2Handler) InstanceStatus

func (ec2Handler *EC2Handler) InstanceStatus(ctx context.Context) (statuses []EC2Status, err error)

func (*EC2Handler) StartInstance

func (ec2Handler *EC2Handler) StartInstance(ctx context.Context) (err error)

func (*EC2Handler) StopInstance

func (ec2Handler *EC2Handler) StopInstance(ctx context.Context) (err error)

type EC2Interface

type EC2Interface interface {
	StartInstance(ctx context.Context) error
	StopInstance(ctx context.Context) error
	InstanceStatus(ctx context.Context) ([]EC2Status, error)
}

func NewEC2Handler

func NewEC2Handler() EC2Interface

type EC2Status

type EC2Status struct {
	InstanceId string `json:"instanceId"`
	Status     string `json:"status"`
}

type KafkaProducer

type KafkaProducer struct{}

func (*KafkaProducer) Publish

func (producer *KafkaProducer) Publish(ctx context.Context, message string) (err error)

type KafkaProducerInterface

type KafkaProducerInterface interface {
	Publish(ctx context.Context, message string) error
}

func NewProducer

func NewProducer() KafkaProducerInterface

type KafkaRequest

type KafkaRequest struct {
	Message string `json:"message"`
}

Jump to

Keyboard shortcuts

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