Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Storage Factory #1558

Merged
merged 8 commits into from
Jun 5, 2020
Merged

Storage Factory #1558

merged 8 commits into from
Jun 5, 2020

Conversation

gdbelvin
Copy link
Contributor

@gdbelvin gdbelvin commented Jun 5, 2020

Support creating storage implementations of various types.

@gdbelvin gdbelvin requested a review from a team as a code owner June 5, 2020 12:14
@gdbelvin gdbelvin requested review from mhutchinson and removed request for a team June 5, 2020 12:14
@codecov
Copy link

codecov bot commented Jun 5, 2020

Codecov Report

Merging #1558 into master will increase coverage by 0.11%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1558      +/-   ##
==========================================
+ Coverage   69.27%   69.39%   +0.11%     
==========================================
  Files          58       58              
  Lines        4355     4355              
==========================================
+ Hits         3017     3022       +5     
+ Misses        906      899       -7     
- Partials      432      434       +2     
Impacted Files Coverage Δ
impl/mysql/dberrors.go 100.00% <ø> (ø)
impl/mysql/open.go 63.63% <ø> (ø)
core/sequencer/trillian_client.go 57.97% <0.00%> (-2.90%) ⬇️
core/sequencer/server.go 73.52% <0.00%> (-0.66%) ⬇️
core/sequencer/election/tracker.go 80.45% <0.00%> (+10.34%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7c31855...4e6e349. Read the comment docs.

cmd/keytransparency-sequencer/main.go Outdated Show resolved Hide resolved
cmd/keytransparency-sequencer/main.go Outdated Show resolved Hide resolved
cmd/keytransparency-server/main.go Outdated Show resolved Hide resolved
impl/storage.go Outdated Show resolved Hide resolved
Comment on lines +38 to +50
Logs interface {
sequencer.LogsReader

// Copied methods from adminserver.LogsAdmin because of duplicate method.

// AddLogs creates and adds new logs for writing to a directory.
AddLogs(ctx context.Context, directoryID string, logIDs ...int64) error
// SetWritable enables or disables new writes from going to logID.
SetWritable(ctx context.Context, directoryID string, logID int64, enabled bool) error

// Copied methods from keyserver.MutationLogs
SendBatch(ctx context.Context, directoryID string, logID int64, batch []*pb.EntryUpdate) (water.Mark, error)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you get a Go Native to review this? It looks a bit clunky to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit of a known issue: golang/go#6977
https://golang.org/ref/spec#Uniqueness_of_identifiers

I think these could be merged if the interfaces were in the same package, because they are in different packages, they are different identifiers.

impl/mysql/open.go Outdated Show resolved Hide resolved
@gdbelvin gdbelvin merged commit b73cc50 into google:master Jun 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants