-
Notifications
You must be signed in to change notification settings - Fork 3
Conversation
Signed-off-by: bokket <[email protected]>
Signed-off-by: bokket <[email protected]>
Signed-off-by: bokket <[email protected]>
docs/rfcs/8-add-tcp-protocol.md
Outdated
## Implementation | ||
|
||
- Add protocol `tcp` | ||
- Implement protocol tcp formatted (`func (p Endpoint) Tcp() (address string)`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about using TCP()
as a function name instead of Tcp()
? Keep the same style with HTTP()
and HTTPS
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And returning address string
is not a good idea to me, how about returning (addr, host string, port int)
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
docs/rfcs/8-add-tcp-protocol.md
Outdated
|
||
- Add protocol `tcp` | ||
- Implement protocol tcp formatted (`func (p Endpoint) Tcp() (address string)`) | ||
- Implement protocol tcp parser (`func Parse(cfg string) (Provider, error)`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Parse
should return (p Endpoint, err error)
instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my mistake
docs/rfcs/8-add-tcp-protocol.md
Outdated
- Add protocol `tcp` | ||
- Implement protocol tcp formatted (`func (p Endpoint) Tcp() (address string)`) | ||
- Implement protocol tcp parser (`func Parse(cfg string) (Provider, error)`) | ||
- Implement protocol tcp object (`func NewTcp(address string) Endpoint `) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about changing the API to NewTCP(host string, port int) Endpoint
instead?
I will approve this proposal with reviewed changes. |
docs/rfcs/8-add-tcp-protocol.md
Outdated
- RFC PR: [beyondstorage/go-endpoint#8](https://github.com/beyondstorage/go-endpoint/pull/8) | ||
- Tracking Issue: [beyondstorage/go-endpoint/issues/9](https://github.com/beyondstorage/go-endpoint/issues/9) | ||
|
||
# RFC-8: Add Tcp protocol |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# RFC-8: Add Tcp protocol | |
# RFC-8: Add TCP protocol |
Signed-off-by: bokket <[email protected]>
Signed-off-by: bokket <[email protected]>
Thanks for your contribution! |
Signed-off-by: bokket [email protected]