Documentation ¶
Index ¶
- Constants
- Variables
- func InitViper()
- type Config
- type Lifecycle
- type LifecycleHandler
- type Service
- type TrainingDataService
- func (c *TrainingDataService) AddEMetrics(ctx context.Context, in *tds.EMetrics) (*tds.AddResponse, error)
- func (c *TrainingDataService) AddEMetricsBatch(ctx context.Context, inBatch *tds.EMetricsBatch) (*tds.AddResponse, error)
- func (c *TrainingDataService) AddLogLine(ctx context.Context, in *tds.LogLine) (*tds.AddResponse, error)
- func (c *TrainingDataService) AddLogLineBatch(ctx context.Context, inBatch *tds.LogLineBatch) (*tds.AddResponse, error)
- func (c *TrainingDataService) DeleteEMetrics(ctx context.Context, in *tds.Query) (*tds.DeleteResponse, error)
- func (c *TrainingDataService) DeleteJob(ctx context.Context, in *tds.Query) (*tds.DeleteResponse, error)
- func (c *TrainingDataService) DeleteLogLines(ctx context.Context, in *tds.Query) (*tds.DeleteResponse, error)
- func (c *TrainingDataService) GetEMetrics(in *tds.Query, stream tds.TrainingData_GetEMetricsServer) error
- func (c *TrainingDataService) GetLogs(in *tds.Query, stream tds.TrainingData_GetLogsServer) error
- func (c *TrainingDataService) Hello(ctx context.Context, in *tds.Empty) (*tds.HelloResponse, error)
Constants ¶
const ( // LogkeyTrainingDataService is the service name that will identify // the TDS in logging records. LogkeyTrainingDataService = "training-data-service" )
const (
// TdsDebug is the viper key to enable extended debug-session style logging in the TDS.
TdsDebug = "tds_debug"
)
Variables ¶
var ( // TdsDebugMode = viper.GetBool(TdsDebug) TdsDebugMode = false // TdsDebugLogLineAdd outputs diagnostic loglines as they are added. Should normally be false. TdsDebugLogLineAdd = false // TdsDebugEMetricAdd outputs diagnostic emetrics as they are added. Should normally be false. TdsDebugEMetricAdd = false // TdsReportTimes if try report timings for Elastic Search operations TdsReportTimes = false )
Functions ¶
Types ¶
type Lifecycle ¶
Lifecycle implements the lifecycle operations for microservice including dynamic service registration.
func (*Lifecycle) GetListenerAddress ¶
GetListenerAddress will get the address and port the service is listening. Returns the empty string if the service is not running but the method is invoked.
type LifecycleHandler ¶
type LifecycleHandler interface { Start(port int, background bool) Stop() GetListenerAddress() string }
LifecycleHandler provides basic lifecycle methods that each microservice has to implement.
type Service ¶
type Service interface { tds.TrainingDataServer LifecycleHandler }
Service represents the functionality of the training status service
func NewService ¶
func NewService() Service
NewService creates a new training status recorder service.
type TrainingDataService ¶
type TrainingDataService struct { Lifecycle // contains filtered or unexported fields }
TrainingDataService holds the in-memory service context.
func (*TrainingDataService) AddEMetrics ¶
func (c *TrainingDataService) AddEMetrics(ctx context.Context, in *tds.EMetrics) (*tds.AddResponse, error)
AddEMetrics adds the passed evaluation metrics record to storage.
func (*TrainingDataService) AddEMetricsBatch ¶
func (c *TrainingDataService) AddEMetricsBatch(ctx context.Context, inBatch *tds.EMetricsBatch) (*tds.AddResponse, error)
AddEMetricsBatch adds the passed evaluation metrics record to storage. noinspection GoBoolExpressions
func (*TrainingDataService) AddLogLine ¶
func (c *TrainingDataService) AddLogLine(ctx context.Context, in *tds.LogLine) (*tds.AddResponse, error)
AddLogLine adds the line line record to storage.
func (*TrainingDataService) AddLogLineBatch ¶
func (c *TrainingDataService) AddLogLineBatch(ctx context.Context, inBatch *tds.LogLineBatch) (*tds.AddResponse, error)
AddLogLineBatch adds the line line record to storage. noinspection GoBoolExpressions
func (*TrainingDataService) DeleteEMetrics ¶
func (c *TrainingDataService) DeleteEMetrics(ctx context.Context, in *tds.Query) (*tds.DeleteResponse, error)
DeleteEMetrics deletes the queried evaluation metrics from storage.
func (*TrainingDataService) DeleteJob ¶
func (c *TrainingDataService) DeleteJob(ctx context.Context, in *tds.Query) (*tds.DeleteResponse, error)
DeleteJob deletes both queried evaluation metrics and log lines.
func (*TrainingDataService) DeleteLogLines ¶
func (c *TrainingDataService) DeleteLogLines(ctx context.Context, in *tds.Query) (*tds.DeleteResponse, error)
DeleteLogLines deletes the queried log lines from storage.
func (*TrainingDataService) GetEMetrics ¶
func (c *TrainingDataService) GetEMetrics(in *tds.Query, stream tds.TrainingData_GetEMetricsServer) error
GetEMetrics returns a stream of evaluation metrics records.
func (*TrainingDataService) GetLogs ¶
func (c *TrainingDataService) GetLogs(in *tds.Query, stream tds.TrainingData_GetLogsServer) error
GetLogs returns a stream of log line records.
func (*TrainingDataService) Hello ¶
func (c *TrainingDataService) Hello(ctx context.Context, in *tds.Empty) (*tds.HelloResponse, error)
Hello is simple a gRPC test endpoint.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package grpc_training_data_v1 is a generated protocol buffer package.
|
Package grpc_training_data_v1 is a generated protocol buffer package. |