Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
IRDB SDK
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Open Source Software
IRDB SDK
Commits
dd1ec536
Commit
dd1ec536
authored
6 years ago
by
Jason Hiser
Browse files
Options
Downloads
Patches
Plain Diff
cleaning up thanos-plugin capability
parent
85a2d55a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/inc-core/transform_step.h
+28
-6
28 additions, 6 deletions
include/inc-core/transform_step.h
with
28 additions
and
6 deletions
include/inc-core/transform_step.h
+
28
−
6
View file @
dd1ec536
...
...
@@ -17,18 +17,36 @@
namespace
IRDB_SDK
{
class
TransformStepState_t
;
class
ThanosPlugin_t
;
using
namespace
std
;
class
TransformStep_t
{
protected:
TransformStep_t
()
{
}
public:
virtual
~
TransformStep_t
(
void
)
{
}
virtual
string
getStepName
(
void
)
const
=
0
;
// abstract methods for plugin to implement
virtual
string
getStepName
(
void
)
const
=
0
;
virtual
int
parseArgs
(
const
vector
<
string
>
step_args
)
=
0
;
virtual
int
executeStep
()
=
0
;
protected
:
TransformStep_t
()
{
}
// Thanos plugins can create these
// helper methods for plugin to use
virtual
File_t
*
getMainFile
()
final
;
virtual
FileIR_t
*
getMainFileIR
()
final
;
virtual
DatabaseID_t
getVariantID
()
final
;
virtual
IRDBObjects_t
*
const
getIRDBObjects
()
final
;
private
:
// private data can only be accessed by protected accessors.
TransformStepState_t
*
m_state
=
nullptr
;
virtual
void
setState
(
TransformStepState_t
*
p_state
)
final
;
friend
class
ThanosPlugin_t
;
virtual
int
parseArgs
(
const
vector
<
string
>
step_args
)
=
0
;
virtual
int
executeStep
(
IRDBObjects_t
*
const
irdb_objects
)
=
0
;
};
}
...
...
@@ -38,6 +56,10 @@ namespace IRDB_SDK
// so that thanos can use it as a factory to create your transform class. It must
// follow this signature:
//
// extern "C" std::shared_ptr<TransformStep_t> GetTransformStep(void);
// extern "C" std::shared_ptr<TransformStep_t> getTransformStep(void);
// {
// return shared_ptr<TransformStep_t>(new YourClassHere_t());
// }
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment