Documentation ¶
Index ¶
- Constants
- func DecodeTimesyncRequests(r io.Reader) <-chan TimesyncRequest
- func EncodeTimesyncReplies(w io.Writer) chan<- TimesyncReply
- func EncodeTimesyncReply(w io.Writer, reply TimesyncReply) error
- func HandleTimesyncProtocol(ctx context.Context, conn net.Conn, impl ProtocolImpl) error
- func ListenSingleConnection(ctx context.Context, sockpath string) (net.Conn, error)
- func ListenUnix(ctx context.Context, sockpath string) (<-chan net.Conn, error)
- func OnCancel(ctx context.Context, cb func())
- func OnInterrupt(ctx context.Context, cb func())
- func Simple(sockpath string, app ProtocolImpl) error
- type ProtocolImpl
- type TimesyncReply
- type TimesyncRequest
Constants ¶
View Source
const ( TimesyncLeaderMagic = 0x71DE7EAD TimesyncFollowerMagic = 0x71DEF011 )
Variables ¶
This section is empty.
Functions ¶
func DecodeTimesyncRequests ¶
func DecodeTimesyncRequests(r io.Reader) <-chan TimesyncRequest
func EncodeTimesyncReplies ¶
func EncodeTimesyncReplies(w io.Writer) chan<- TimesyncReply
func EncodeTimesyncReply ¶
func EncodeTimesyncReply(w io.Writer, reply TimesyncReply) error
func HandleTimesyncProtocol ¶
func ListenSingleConnection ¶
func OnInterrupt ¶
func Simple ¶
func Simple(sockpath string, app ProtocolImpl) error
Types ¶
type ProtocolImpl ¶
type TimesyncReply ¶
type TimesyncRequest ¶
func DecodeTimesyncRequest ¶
func DecodeTimesyncRequest(r io.Reader) (TimesyncRequest, error)
Click to show internal directories.
Click to hide internal directories.