asyncserverutil

package
v0.0.0-...-7847555 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2018 License: CC0-1.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToRunFunc

func ToRunFunc(f BasicFunc) asyncserver.RunFunc

ToRunFunc generates an asyncserver.RunFunc from the given function f.

func ToRunFuncNoReply

func ToRunFuncNoReply(f NoReplyFunc) asyncserver.RunFunc

ToRunFuncNoReply generates an asyncserver.RunFunc from the given function f.

func ToRunFuncNoReplyWithClient

func ToRunFuncNoReplyWithClient(f NoReplyFuncWithClient) asyncserver.RunFunc

ToRunFuncNoReplyWithClient generates an asyncserver.RunFunc from the given function f.

func ToRunFuncWithClient

func ToRunFuncWithClient(f BasicFuncWithClient) asyncserver.RunFunc

ToRunFuncWithClient generates an asyncserver.RunFunc from the given function f.

func ToRunFuncWithClientContext

func ToRunFuncWithClientContext(f BasicFuncWithClientContext) asyncserver.RunFunc

ToRunFuncWithClientContext generates an asyncserver.RunFunc from the given function f.

func ToRunFuncWithContext

func ToRunFuncWithContext(f BasicFuncWithContext) asyncserver.RunFunc

ToRunFuncWithContext generates an asyncserver.RunFunc from the given function f.

func ToTaskFunc

func ToTaskFunc(f BasicTaskFunc) asyncserver.TaskFunc

ToTaskFunc generates an asyncserver.TaskFunc from the given function f.

Types

type BasicFunc

type BasicFunc func(w binaryutil.BinaryWriter, lg log.Interface) error

BasicFunc is a function that can be transformed into an asyncserver.RunFunc via ToRunFunc. The function should write response data to w. Data written to w will be buffered, and sent to the client on successful return.

type BasicFuncWithClient

type BasicFuncWithClient func(c *asyncserver.Client, w binaryutil.BinaryWriter, lg log.Interface) error

BasicFuncWithClient is a function that can be transformed into an asyncserver.RunFunc via ToRunFuncWithClient. The function should write response data to w. Data written to w will be buffered, and sent to the client on successful return.

type BasicFuncWithClientContext

type BasicFuncWithClientContext func(ctx context.Context, c *asyncserver.Client, w binaryutil.BinaryWriter, lg log.Interface) error

BasicFuncWithClientContext is a function that can be transformed into an asyncserver.RunFunc via ToRunFuncWithClientContext. The function should write response data to w. Data written to w will be buffered, and sent to the client on successful return.

type BasicFuncWithContext

type BasicFuncWithContext func(ctx context.Context, w binaryutil.BinaryWriter, lg log.Interface) error

BasicFuncWithContext is a function that can be transformed into an asyncserver.RunFunc via ToRunFuncWithContext. The function should write response data to w. Data written to w will be buffered, and sent to the client on successful return.

type BasicTaskFunc

type BasicTaskFunc func(r binaryutil.BinaryReader, lg log.Interface) (asyncserver.RunFunc, error)

BasicTaskFunc is a function that can be transformed into an asyncserver.TaskFunc via ToTaskFunc.

type NoReplyFunc

type NoReplyFunc func(lg log.Interface) error

NoReplyFunc is a function that can be transformed into an asyncserver.RunFunc via ToRunFuncNoReply.

type NoReplyFuncWithClient

type NoReplyFuncWithClient func(c *asyncserver.Client, lg log.Interface) error

NoReplyFuncWithClient is a function that can be transformed into an asyncserver.RunFunc via ToRunFuncNoReplyWithClient.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL