Skip to content

Commit

Permalink
chore: fix export comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ravisuhag committed Sep 10, 2021
1 parent b0e37d5 commit 777cf20
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/pkg/errors"
)

// Agent contains fields responsible for the execution of a recipe.
// Agent runs recipes for specified plugins.
type Agent struct {
extractorFactory *registry.ExtractorFactory
processorFactory *registry.ProcessorFactory
Expand All @@ -22,7 +22,7 @@ type Agent struct {
logger log.Logger
}

// NewAgent creates a new Agent.
// NewAgent returns an Agent with plugin factories.
func NewAgent(ef *registry.ExtractorFactory, pf *registry.ProcessorFactory, sf *registry.SinkFactory, mt Monitor, logger log.Logger) *Agent {
if isNilMonitor(mt) {
mt = new(defaultMonitor)
Expand All @@ -36,7 +36,7 @@ func NewAgent(ef *registry.ExtractorFactory, pf *registry.ProcessorFactory, sf *
}
}

// Validate validates the recipe.
// Validate checks the recipe for linting errors.
func (r *Agent) Validate(rcp recipe.Recipe) (errs []error) {
if ext, err := r.extractorFactory.Get(rcp.Source.Type); err != nil {
errs = append(errs, errors.Wrapf(err, "invalid config for %s (%s)", rcp.Source.Type, plugins.PluginTypeExtractor))
Expand Down Expand Up @@ -70,7 +70,7 @@ func (r *Agent) Validate(rcp recipe.Recipe) (errs []error) {
return
}

// RunMultiple runs multiple recipes.
// RunMultiple executes multiple recipes.
func (r *Agent) RunMultiple(recipes []recipe.Recipe) []Run {
var wg sync.WaitGroup
runs := make([]Run, len(recipes))
Expand All @@ -92,7 +92,7 @@ func (r *Agent) RunMultiple(recipes []recipe.Recipe) []Run {
return runs
}

// Run runs a recipe.
// Run executes the specified recipe.
func (r *Agent) Run(recipe recipe.Recipe) (run Run) {
r.logger.Info("running recipe", "recipe", recipe.Name)
var wg sync.WaitGroup
Expand Down
6 changes: 3 additions & 3 deletions agent/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import "github.com/odpf/meteor/recipe"
type TaskType string

const (
// TaskTypeExtract is the type of a task that extracts a file
// TaskTypeExtract is the type of task that extracts a record
TaskTypeExtract TaskType = "extract"
// TaskTypeProcess is the type of a task that processes a file
// TaskTypeProcess is the type of task that processes a record
TaskTypeProcess TaskType = "process"
// TaskTypeSink is the type of a task that sends a file to a sink
// TaskTypeSink is the type of task that sends a record to a sink
TaskTypeSink TaskType = "sink"
)

Expand Down
2 changes: 1 addition & 1 deletion generator/recipe.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var file embed.FS

var size uint = 2

// Template contains the set of fields that are used to generate the recipe
// Template represents the template for generating a recipe.
type Template struct {
Name string
Source map[string]string
Expand Down
2 changes: 1 addition & 1 deletion metrics/statsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var (
runMetricName = "run"
)

// StatsdMonitor contains the statsd client and prefix
// StatsdMonitor reprsents the statsd monitor.
type StatsdMonitor struct {
client statsdClient
prefix string
Expand Down

0 comments on commit 777cf20

Please sign in to comment.