mng2db

package
v0.0.0-...-b4ebc5e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct{}

外部から呼ばれるinterface

func (Client) CreateStatusFile

func (c Client) CreateStatusFile(jobUUID string) error

func (Client) DeleteShares

func (c Client) DeleteShares(dataIDs []string) error

DBから指定されたシェアを削除する

func (Client) DeleteStatusFile

func (c Client) DeleteStatusFile(jobUUID string) error

func (Client) GetComputationResult

func (c Client) GetComputationResult(jobUUID string, resultTypes []string) ([]*ComputationResult, error)

DBから計算結果を得る

func (Client) GetComputationStatus

func (c Client) GetComputationStatus(jobUUID string) (pb_types.JobStatus, error)

func (Client) GetElapsedTime

func (c Client) GetElapsedTime(jobUUID string) (float64, error)

func (Client) GetJobErrorInfo

func (c Client) GetJobErrorInfo(jobUUID string) *pb_types.JobErrorInfo

func (Client) GetMatchingColumn

func (c Client) GetMatchingColumn(dataID string) (int32, error)

func (Client) GetSchema

func (c Client) GetSchema(dataID string) ([]*pb_types.Schema, error)

DBからschemaを得る

func (Client) GetSharePiece

func (c Client) GetSharePiece(dataID string, pieceID int32) (Share, error)

func (Client) GetSharePieceSize

func (c Client) GetSharePieceSize(dataID string) (int32, error)

func (Client) InsertShares

func (c Client) InsertShares(dataID string, schema []*pb_types.Schema, pieceID int32, shares string, sentAt string, matchingColumn int32) error

DBにシェアを保存する

type ComputationResult

type ComputationResult struct {
	ID      string                `json:"id"`
	JobUUID string                `json:"job_uuid"`
	Result  []string              `json:"result"`
	Meta    ComputationResultMeta `json:"meta"`
}

type ComputationResultMeta

type ComputationResultMeta struct {
	ColumnNumber int32 `json:"column_number"`
	PieceID      int32 `json:"piece_id"`
	ResultType   string
}

計算結果形式

type M2DbClient

type M2DbClient interface {
	GetSharePieceSize(string) (int32, error)
	InsertShares(string, []*pb_types.Schema, int32, string, string, int32) error
	DeleteShares([]string) error
	GetSharePiece(string, int32) (Share, error)
	GetSchema(string) ([]*pb_types.Schema, error)
	GetComputationStatus(string) (pb_types.JobStatus, error)
	GetJobErrorInfo(string) *pb_types.JobErrorInfo
	GetComputationResult(string, []string) ([]*ComputationResult, error)
	GetElapsedTime(string) (float64, error)
	GetMatchingColumn(string) (int32, error)
	CreateStatusFile(string) error
	DeleteStatusFile(string) error
}

type Share

type Share struct {
	DataID string     `json:"data_id"`
	Meta   ShareMeta  `json:"meta"`
	Value  [][]string `json:"value"`
	SentAt string     `json:"sent_at"`
}

type ShareMeta

type ShareMeta struct {
	Schema         []*pb_types.Schema `json:"schema"`
	PieceID        int32              `json:"piece_id"`
	MatchingColumn int32              `json:"matching_column"`
}

Share形式

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL