-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mentix service #755
Mentix service #755
Conversation
@Daniel-WWU-IT first of all, congrats for this astonishing piece of work, nice job!
I couldn't agree more, let make sure is tracked in a Github issue for later. One question, can you figure out the I'm happy to merge after you make CI green (some lints are failling). |
@labkode I just updated everything to make lint happy and added some comments as well. The |
@Daniel-WWU-IT thanks! I was refering to this package: |
I'm not using that package, neither directly nor indirectly. According to
|
return nil | ||
} | ||
|
||
func (exporter *WebAPIExporter) GetName() string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exported method WebAPIExporter.GetName should have comment or be unexported
return nil | ||
} | ||
|
||
func (exporter *WebAPIExporter) HandleRequest(resp http.ResponseWriter, req *http.Request) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exported method WebAPIExporter.HandleRequest should have comment or be unexported
BaseRequestExporter | ||
} | ||
|
||
func (exporter *WebAPIExporter) Activate(conf *config.Configuration, log *zerolog.Logger) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exported method WebAPIExporter.Activate should have comment or be unexported
"github.com/cs3org/reva/pkg/mentix/exporters/webapi" | ||
) | ||
|
||
type WebAPIExporter struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exported type WebAPIExporter should have comment or be unexported
return strings.TrimSpace(endpoint) | ||
} | ||
|
||
func (exporter *BaseRequestExporter) WantsRequest(r *http.Request) bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exported method BaseRequestExporter.WantsRequest should have comment or be unexported
return nil | ||
} | ||
|
||
func (exporter *BaseExporter) Stop() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exported method BaseExporter.Stop should have comment or be unexported
return nil | ||
} | ||
|
||
func (exporter *BaseExporter) Start() error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exported method BaseExporter.Start should have comment or be unexported
locker sync.RWMutex | ||
} | ||
|
||
func (exporter *BaseExporter) Activate(conf *config.Configuration, log *zerolog.Logger) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exported method BaseExporter.Activate should have comment or be unexported
return properties | ||
} | ||
|
||
func (connector *GOCDBConnector) GetName() string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exported method GOCDBConnector.GetName should have comment or be unexported
return nil | ||
} | ||
|
||
func (connector *GOCDBConnector) RetrieveMeshData() (*meshdata.MeshData, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exported method GOCDBConnector.RetrieveMeshData should have comment or be unexported
gocdbAddress string | ||
} | ||
|
||
func (connector *GOCDBConnector) Activate(conf *config.Configuration, log *zerolog.Logger) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exported method GOCDBConnector.Activate should have comment or be unexported
"github.com/cs3org/reva/pkg/mentix/network" | ||
) | ||
|
||
type GOCDBConnector struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exported type GOCDBConnector should have comment or be unexported
return nil | ||
} | ||
|
||
func FindConnector(connectorID string) (Connector, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exported function FindConnector should have comment or be unexported
log *zerolog.Logger | ||
} | ||
|
||
func (connector *BaseConnector) Activate(conf *config.Configuration, log *zerolog.Logger) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exported method BaseConnector.Activate should have comment or be unexported
) | ||
|
||
const ( | ||
ExporterIDWebAPI = "webapi" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exported const ExporterIDWebAPI should have comment (or a comment on this block) or be unexported
package config | ||
|
||
const ( | ||
ConnectorIDGOCDB = "gocdb" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exported const ConnectorIDGOCDB should have comment (or a comment on this block) or be unexported
This PR adds Mentix (Mesh Entity Exporter) as a Reva service. This includes:
For logging, I had to extend the rhttp
NewService
type to pass the global logger, as Mentix is actually a background service and needs logging outside of an HTTP request. I think that there should be services of a more general type so that services like Mentix can be added in a more elegant, streamlined way.