Skip to content

Conversation

@aleksander-vedvik
Copy link
Collaborator

No description provided.

aleksander-vedvik and others added 29 commits May 29, 2024 16:11
Changed how servers reply to clients. It uses RPCCall instead of
Unicast. This makes it easy to check for errors when logging.

Also, refactored the broadcast processor to make it more readable.
Copy link
Member

@meling meling left a comment

Choose a reason for hiding this comment

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

I'm far from done, but I'm posting now three issues... I hope to get to this in the next few weeks.

logger *slog.Logger
}

func NewBroadcastManager(logger *slog.Logger, createClient func(addr string, dialOpts []grpc.DialOption) (*Client, error), canceler func(broadcastID uint64, srvAddrs []string), order map[string]int, dialTimeout, reqTTL time.Duration, shardBuffer, sendBuffer int, allowList map[string]string, dialOpts ...grpc.DialOption) Manager {
Copy link
Member

Choose a reason for hiding this comment

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

Too many arguments.

ServerOriginAddr string = "server"
)

type ServerHandler func(ctx context.Context, in protoreflect.ProtoMessage, broadcastID uint64, originAddr, originMethod string, options BroadcastOptions, id uint32, addr string, originDigest, originSignature []byte, originPubKey string)
Copy link
Member

Choose a reason for hiding this comment

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

Too many arguments.

"google.golang.org/protobuf/reflect/protoreflect"
)

type Manager interface {
Copy link
Member

Choose a reason for hiding this comment

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

Do we need an interface for this? We should be able to call the methods on the manager struct itself. Also, feels like there are too many methods available on the manager type;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants