rework service options #24
Labels
No Label
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: unistack-org/micro-roadmap#24
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
rework service options struct and methods to get:
so service acts as container for primitives
how to deal with top level options in micro like micro.Address or micro.Broker ?
as we can have multiple brokers that will be used for specific client and server we need to configure each client and server individually not via single micro.Broker option
Broker/Registry/Address options will be changed to following signature
func Broker(id string, b broker.Broker) (Option, error)
all Option will be changed to func(xxx) (Option, error) to allow validation
extend server/client/broker/registry with ID() method that returns configured id
also options must have ID string field.
So when you want to publish you can call svc.Client(ID).Publish(xxx, client.PublishBroker(ID))
or subscribe
svc.Server(ID).Subscrbe(xxx, server.SubscribeBroker(ID))