Skip to content

Commit

Permalink
Logging refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
mantzas committed Oct 26, 2024
1 parent bebbeba commit 5822344
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions service.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ type Service struct {
observabilityProvider *observability.Provider
}

// New creates a new Service instance.
func New(name, version string, options ...OptionFunc) (*Service, error) {
if name == "" {
return nil, errors.New("name is required")
Expand Down Expand Up @@ -83,6 +84,7 @@ func New(name, version string, options ...OptionFunc) (*Service, error) {
return s, nil
}

// Run starts the service with the provided components.
func (s *Service) Run(ctx context.Context, components ...Component) error {
if len(components) == 0 || components[0] == nil {
return errors.New("components are empty or nil")
Expand Down

0 comments on commit 5822344

Please sign in to comment.