Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
d440b9a8
Commit
d440b9a8
authored
Jun 29, 2018
by
bergquist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
registry: adds more comments
parent
f0f6d0e9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
pkg/registry/registry.go
+7
-4
No files found.
pkg/registry/registry.go
View file @
d440b9a8
...
@@ -54,14 +54,17 @@ type CanBeDisabled interface {
...
@@ -54,14 +54,17 @@ type CanBeDisabled interface {
IsDisabled
()
bool
IsDisabled
()
bool
}
}
// BackgroundService should be implemented for services that have
// long running tasks in the background.
type
BackgroundService
interface
{
type
BackgroundService
interface
{
Run
(
ctx
context
.
Context
)
error
}
type
HasInitPriority
interface
{
// Run starts the background process of the service after `Init` have been called
GetInitPriority
()
Priority
// on all services. The `context.Context` passed into the function should be used
// to subscribe to ctx.Done() so the service can be notified when Grafana shuts down.
Run
(
ctx
context
.
Context
)
error
}
}
// IsDisabled takes an service and return true if its disabled
func
IsDisabled
(
srv
Service
)
bool
{
func
IsDisabled
(
srv
Service
)
bool
{
canBeDisabled
,
ok
:=
srv
.
(
CanBeDisabled
)
canBeDisabled
,
ok
:=
srv
.
(
CanBeDisabled
)
return
ok
&&
canBeDisabled
.
IsDisabled
()
return
ok
&&
canBeDisabled
.
IsDisabled
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment