mirror of
https://github.com/go-micro/go-micro.git
synced 2025-11-29 21:47:44 +02:00
fix: some linting issues (#2563)
This commit is contained in:
@@ -7,15 +7,15 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
// DefaultRuntime is default micro runtime
|
||||
// DefaultRuntime is default micro runtime.
|
||||
DefaultRuntime Runtime = NewRuntime()
|
||||
// DefaultName is default runtime service name
|
||||
// DefaultName is default runtime service name.
|
||||
DefaultName = "go.micro.runtime"
|
||||
|
||||
ErrAlreadyExists = errors.New("already exists")
|
||||
)
|
||||
|
||||
// Runtime is a service runtime manager
|
||||
// Runtime is a service runtime manager.
|
||||
type Runtime interface {
|
||||
// Init initializes runtime
|
||||
Init(...Option) error
|
||||
@@ -37,7 +37,7 @@ type Runtime interface {
|
||||
String() string
|
||||
}
|
||||
|
||||
// Stream returns a log stream
|
||||
// Stream returns a log stream.
|
||||
type LogStream interface {
|
||||
Error() error
|
||||
Chan() chan LogRecord
|
||||
@@ -49,7 +49,7 @@ type LogRecord struct {
|
||||
Metadata map[string]string
|
||||
}
|
||||
|
||||
// Scheduler is a runtime service scheduler
|
||||
// Scheduler is a runtime service scheduler.
|
||||
type Scheduler interface {
|
||||
// Notify publishes schedule events
|
||||
Notify() (<-chan Event, error)
|
||||
@@ -57,19 +57,19 @@ type Scheduler interface {
|
||||
Close() error
|
||||
}
|
||||
|
||||
// EventType defines schedule event
|
||||
// EventType defines schedule event.
|
||||
type EventType int
|
||||
|
||||
const (
|
||||
// Create is emitted when a new build has been craeted
|
||||
// Create is emitted when a new build has been craeted.
|
||||
Create EventType = iota
|
||||
// Update is emitted when a new update become available
|
||||
// Update is emitted when a new update become available.
|
||||
Update
|
||||
// Delete is emitted when a build has been deleted
|
||||
// Delete is emitted when a build has been deleted.
|
||||
Delete
|
||||
)
|
||||
|
||||
// String returns human readable event type
|
||||
// String returns human readable event type.
|
||||
func (t EventType) String() string {
|
||||
switch t {
|
||||
case Create:
|
||||
@@ -83,7 +83,7 @@ func (t EventType) String() string {
|
||||
}
|
||||
}
|
||||
|
||||
// Event is notification event
|
||||
// Event is notification event.
|
||||
type Event struct {
|
||||
// ID of the event
|
||||
ID string
|
||||
@@ -97,7 +97,7 @@ type Event struct {
|
||||
Options *CreateOptions
|
||||
}
|
||||
|
||||
// Service is runtime service
|
||||
// Service is runtime service.
|
||||
type Service struct {
|
||||
// Name of the service
|
||||
Name string
|
||||
|
||||
Reference in New Issue
Block a user