mirror of
https://github.com/ultravioletrs/cocos.git
synced 2026-08-07 07:14:50 +00:00
COCOS-152 - Refactor algorithm execution and add visibility through logging and events (#176)
* * feat(agent): add support for binary algorithm execution * * feat(agent/algorithm): add Algorithm interface and binary implementation * * feat(agent/algorithm/binary): implement Run method for binary algorithm execution * * feat(agent/algorithm/logging): implement Stdout and Stderr writers for algorithm logging * * feat(agent/algorithm/logging_test): add tests for Stdout and Stderr writers * * feat(agent/events): add Service interface for sending events * * feat(agent/events/mocks): add mock implementation for Service interface * * refactor(agent/service): update runComputation method to use binary algorithm implementation Signed-off-by: SammyOina <sammyoina@gmail.com> * * fix(logging.go): handle error when sending event in Write method of Stderr struct * test(logging_test.go): add copyright header * fix(backend_info.go): add missing type declaration in function signature * fix(agent.go): rename progressbar variable to pb for clarity and consistency Signed-off-by: SammyOina <sammyoina@gmail.com> --------- Signed-off-by: SammyOina <sammyoina@gmail.com>
This commit is contained in:
committed by
GitHub
parent
dc16e8a997
commit
2ceb1c3562
@@ -0,0 +1,9 @@
|
||||
// Copyright (c) Ultraviolet
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
package algorithm
|
||||
|
||||
// Algorithm is an interface that specifies the API for an algorithm.
|
||||
type Algorithm interface {
|
||||
// Run executes the algorithm and returns the result.
|
||||
Run() ([]byte, error)
|
||||
}
|
||||
Reference in New Issue
Block a user