本文整理汇总了Golang中zombiezen/com/go/capnproto2.NewCallOptions函数的典型用法代码示例。如果您正苦于以下问题:Golang NewCallOptions函数的具体用法?Golang NewCallOptions怎么用?Golang NewCallOptions使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了NewCallOptions函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1: GetCallSequence
func (c Echoer) GetCallSequence(ctx context.Context, params func(CallOrder_getCallSequence_Params) error, opts ...capnp.CallOption) CallOrder_getCallSequence_Results_Promise {
if c.Client == nil {
return CallOrder_getCallSequence_Results_Promise{Pipeline: capnp.NewPipeline(capnp.ErrorAnswer(capnp.ErrNullClient))}
}
return CallOrder_getCallSequence_Results_Promise{Pipeline: capnp.NewPipeline(c.Client.Call(&capnp.Call{
Ctx: ctx,
Method: capnp.Method{
InterfaceID: 0x92c5ca8314cdd2a5,
MethodID: 0,
InterfaceName: "test.capnp:CallOrder",
MethodName: "getCallSequence",
},
ParamsSize: capnp.ObjectSize{DataSize: 8, PointerCount: 0},
ParamsFunc: func(s capnp.Struct) error { return params(CallOrder_getCallSequence_Params{Struct: s}) },
Options: capnp.NewCallOptions(opts),
}))}
}
开发者ID:hodduc,项目名称:go-capnproto2,代码行数:18,代码来源:test.capnp.go
示例2: Add
func (c Adder) Add(ctx context.Context, params func(Adder_add_Params) error, opts ...capnp.CallOption) Adder_add_Results_Promise {
if c.Client == nil {
return Adder_add_Results_Promise{Pipeline: capnp.NewPipeline(capnp.ErrorAnswer(capnp.ErrNullClient))}
}
return Adder_add_Results_Promise{Pipeline: capnp.NewPipeline(c.Client.Call(&capnp.Call{
Ctx: ctx,
Method: capnp.Method{
InterfaceID: 0x8f9cac550b1bf41f,
MethodID: 0,
InterfaceName: "test.capnp:Adder",
MethodName: "add",
},
ParamsSize: capnp.ObjectSize{DataSize: 8, PointerCount: 0},
ParamsFunc: func(s capnp.Struct) error { return params(Adder_add_Params{Struct: s}) },
Options: capnp.NewCallOptions(opts),
}))}
}
开发者ID:hodduc,项目名称:go-capnproto2,代码行数:18,代码来源:test.capnp.go
示例3: NewHandle
func (c HandleFactory) NewHandle(ctx context.Context, params func(HandleFactory_newHandle_Params) error, opts ...capnp.CallOption) HandleFactory_newHandle_Results_Promise {
if c.Client == nil {
return HandleFactory_newHandle_Results_Promise{Pipeline: capnp.NewPipeline(capnp.ErrorAnswer(capnp.ErrNullClient))}
}
return HandleFactory_newHandle_Results_Promise{Pipeline: capnp.NewPipeline(c.Client.Call(&capnp.Call{
Ctx: ctx,
Method: capnp.Method{
InterfaceID: 0x8491a7fe75fe0bce,
MethodID: 0,
InterfaceName: "test.capnp:HandleFactory",
MethodName: "newHandle",
},
ParamsSize: capnp.ObjectSize{DataSize: 0, PointerCount: 0},
ParamsFunc: func(s capnp.Struct) error { return params(HandleFactory_newHandle_Params{Struct: s}) },
Options: capnp.NewCallOptions(opts),
}))}
}
开发者ID:hodduc,项目名称:go-capnproto2,代码行数:18,代码来源:test.capnp.go
示例4: Echo
func (c Echoer) Echo(ctx context.Context, params func(Echoer_echo_Params) error, opts ...capnp.CallOption) Echoer_echo_Results_Promise {
if c.Client == nil {
return Echoer_echo_Results_Promise{Pipeline: capnp.NewPipeline(capnp.ErrorAnswer(capnp.ErrNullClient))}
}
return Echoer_echo_Results_Promise{Pipeline: capnp.NewPipeline(c.Client.Call(&capnp.Call{
Ctx: ctx,
Method: capnp.Method{
InterfaceID: 0x841756c6a41b2a45,
MethodID: 0,
InterfaceName: "test.capnp:Echoer",
MethodName: "echo",
},
ParamsSize: capnp.ObjectSize{DataSize: 0, PointerCount: 1},
ParamsFunc: func(s capnp.Struct) error { return params(Echoer_echo_Params{Struct: s}) },
Options: capnp.NewCallOptions(opts),
}))}
}
开发者ID:hodduc,项目名称:go-capnproto2,代码行数:18,代码来源:test.capnp.go
示例5: Sum
func (c Hash) Sum(ctx context.Context, params func(Hash_sum_Params) error, opts ...capnp.CallOption) Hash_sum_Results_Promise {
if c.Client == nil {
return Hash_sum_Results_Promise{Pipeline: capnp.NewPipeline(capnp.ErrorAnswer(capnp.ErrNullClient))}
}
return Hash_sum_Results_Promise{Pipeline: capnp.NewPipeline(c.Client.Call(&capnp.Call{
Ctx: ctx,
Method: capnp.Method{
InterfaceID: 0xf29f97dd675a9431,
MethodID: 1,
InterfaceName: "hash.capnp:Hash",
MethodName: "sum",
},
ParamsSize: capnp.ObjectSize{DataSize: 0, PointerCount: 0},
ParamsFunc: func(s capnp.Struct) error { return params(Hash_sum_Params{Struct: s}) },
Options: capnp.NewCallOptions(opts),
}))}
}
开发者ID:hodduc,项目名称:go-capnproto2,代码行数:18,代码来源:hash.capnp.go
示例6: Hang
func (c Hanger) Hang(ctx context.Context, params func(Hanger_hang_Params) error, opts ...capnp.CallOption) Hanger_hang_Results_Promise {
if c.Client == nil {
return Hanger_hang_Results_Promise{Pipeline: capnp.NewPipeline(capnp.ErrorAnswer(capnp.ErrNullClient))}
}
return Hanger_hang_Results_Promise{Pipeline: capnp.NewPipeline(c.Client.Call(&capnp.Call{
Ctx: ctx,
Method: capnp.Method{
InterfaceID: 0x8ae08044aae8a26e,
MethodID: 0,
InterfaceName: "test.capnp:Hanger",
MethodName: "hang",
},
ParamsSize: capnp.ObjectSize{DataSize: 0, PointerCount: 0},
ParamsFunc: func(s capnp.Struct) error { return params(Hanger_hang_Params{Struct: s}) },
Options: capnp.NewCallOptions(opts),
}))}
}
开发者ID:hodduc,项目名称:go-capnproto2,代码行数:18,代码来源:test.capnp.go
示例7: NewSha1
func (c HashFactory) NewSha1(ctx context.Context, params func(HashFactory_newSha1_Params) error, opts ...capnp.CallOption) HashFactory_newSha1_Results_Promise {
if c.Client == nil {
return HashFactory_newSha1_Results_Promise{Pipeline: capnp.NewPipeline(capnp.ErrorAnswer(capnp.ErrNullClient))}
}
return HashFactory_newSha1_Results_Promise{Pipeline: capnp.NewPipeline(c.Client.Call(&capnp.Call{
Ctx: ctx,
Method: capnp.Method{
InterfaceID: 0xaead580f97fddabc,
MethodID: 0,
InterfaceName: "hash.capnp:HashFactory",
MethodName: "newSha1",
},
ParamsSize: capnp.ObjectSize{DataSize: 0, PointerCount: 0},
ParamsFunc: func(s capnp.Struct) error { return params(HashFactory_newSha1_Params{Struct: s}) },
Options: capnp.NewCallOptions(opts),
}))}
}
开发者ID:hodduc,项目名称:go-capnproto2,代码行数:18,代码来源:hash.capnp.go
示例8: EchoNum
func (c PingPong) EchoNum(ctx context.Context, params func(PingPong_echoNum_Params) error, opts ...capnp.CallOption) PingPong_echoNum_Results_Promise {
if c.Client == nil {
return PingPong_echoNum_Results_Promise{Pipeline: capnp.NewPipeline(capnp.ErrorAnswer(capnp.ErrNullClient))}
}
call := &capnp.Call{
Ctx: ctx,
Method: capnp.Method{
InterfaceID: 0xf004c474c2f8ee7a,
MethodID: 0,
InterfaceName: "test.capnp:PingPong",
MethodName: "echoNum",
},
Options: capnp.NewCallOptions(opts),
}
if params != nil {
call.ParamsSize = capnp.ObjectSize{DataSize: 8, PointerCount: 0}
call.ParamsFunc = func(s capnp.Struct) error { return params(PingPong_echoNum_Params{Struct: s}) }
}
return PingPong_echoNum_Results_Promise{Pipeline: capnp.NewPipeline(c.Client.Call(call))}
}
开发者ID:zombiezen,项目名称:go-capnproto2,代码行数:20,代码来源:test.capnp.go
示例9: Write
func (c Hash) Write(ctx context.Context, params func(Hash_write_Params) error, opts ...capnp.CallOption) Hash_write_Results_Promise {
if c.Client == nil {
return Hash_write_Results_Promise{Pipeline: capnp.NewPipeline(capnp.ErrorAnswer(capnp.ErrNullClient))}
}
call := &capnp.Call{
Ctx: ctx,
Method: capnp.Method{
InterfaceID: 0xf29f97dd675a9431,
MethodID: 0,
InterfaceName: "hash.capnp:Hash",
MethodName: "write",
},
Options: capnp.NewCallOptions(opts),
}
if params != nil {
call.ParamsSize = capnp.ObjectSize{DataSize: 0, PointerCount: 1}
call.ParamsFunc = func(s capnp.Struct) error { return params(Hash_write_Params{Struct: s}) }
}
return Hash_write_Results_Promise{Pipeline: capnp.NewPipeline(c.Client.Call(call))}
}
开发者ID:zombiezen,项目名称:go-capnproto2,代码行数:20,代码来源:hash.capnp.go
示例10: Export
func (c RealmGateway) Export(ctx context.Context, params func(RealmGateway_export_Params) error, opts ...capnp.CallOption) Persistent_SaveResults_Promise {
if c.Client == nil {
return Persistent_SaveResults_Promise{Pipeline: capnp.NewPipeline(capnp.ErrorAnswer(capnp.ErrNullClient))}
}
call := &capnp.Call{
Ctx: ctx,
Method: capnp.Method{
InterfaceID: 0x84ff286cd00a3ed4,
MethodID: 1,
InterfaceName: "persistent.capnp:RealmGateway",
MethodName: "export",
},
Options: capnp.NewCallOptions(opts),
}
if params != nil {
call.ParamsSize = capnp.ObjectSize{DataSize: 0, PointerCount: 2}
call.ParamsFunc = func(s capnp.Struct) error { return params(RealmGateway_export_Params{Struct: s}) }
}
return Persistent_SaveResults_Promise{Pipeline: capnp.NewPipeline(c.Client.Call(call))}
}
开发者ID:zombiezen,项目名称:go-capnproto2,代码行数:20,代码来源:persistent.capnp.go
示例11: Save
func (c Persistent) Save(ctx context.Context, params func(Persistent_SaveParams) error, opts ...capnp.CallOption) Persistent_SaveResults_Promise {
if c.Client == nil {
return Persistent_SaveResults_Promise{Pipeline: capnp.NewPipeline(capnp.ErrorAnswer(capnp.ErrNullClient))}
}
call := &capnp.Call{
Ctx: ctx,
Method: capnp.Method{
InterfaceID: 0xc8cb212fcd9f5691,
MethodID: 0,
InterfaceName: "persistent.capnp:Persistent",
MethodName: "save",
},
Options: capnp.NewCallOptions(opts),
}
if params != nil {
call.ParamsSize = capnp.ObjectSize{DataSize: 0, PointerCount: 1}
call.ParamsFunc = func(s capnp.Struct) error { return params(Persistent_SaveParams{Struct: s}) }
}
return Persistent_SaveResults_Promise{Pipeline: capnp.NewPipeline(c.Client.Call(call))}
}
开发者ID:zombiezen,项目名称:go-capnproto2,代码行数:20,代码来源:persistent.capnp.go
示例12: TakeTurn
func (c Ai) TakeTurn(ctx context.Context, params func(Ai_takeTurn_Params) error, opts ...capnp.CallOption) Ai_takeTurn_Results_Promise {
if c.Client == nil {
return Ai_takeTurn_Results_Promise{Pipeline: capnp.NewPipeline(capnp.ErrorAnswer(capnp.ErrNullClient))}
}
call := &capnp.Call{
Ctx: ctx,
Method: capnp.Method{
InterfaceID: 0xd403ce7bb5b69f1f,
MethodID: 0,
InterfaceName: "botapi.capnp:Ai",
MethodName: "takeTurn",
},
Options: capnp.NewCallOptions(opts),
}
if params != nil {
call.ParamsSize = capnp.ObjectSize{DataSize: 0, PointerCount: 1}
call.ParamsFunc = func(s capnp.Struct) error { return params(Ai_takeTurn_Params{Struct: s}) }
}
return Ai_takeTurn_Results_Promise{Pipeline: capnp.NewPipeline(c.Client.Call(call))}
}
开发者ID:bcspragu,项目名称:Gobots,代码行数:20,代码来源:botapi.capnp.go
示例13: Connect
func (c AiConnector) Connect(ctx context.Context, params func(ConnectRequest) error, opts ...capnp.CallOption) AiConnector_connect_Results_Promise {
if c.Client == nil {
return AiConnector_connect_Results_Promise{Pipeline: capnp.NewPipeline(capnp.ErrorAnswer(capnp.ErrNullClient))}
}
call := &capnp.Call{
Ctx: ctx,
Method: capnp.Method{
InterfaceID: 0x9804b41cc3cba212,
MethodID: 0,
InterfaceName: "botapi.capnp:AiConnector",
MethodName: "connect",
},
Options: capnp.NewCallOptions(opts),
}
if params != nil {
call.ParamsSize = capnp.ObjectSize{DataSize: 0, PointerCount: 2}
call.ParamsFunc = func(s capnp.Struct) error { return params(ConnectRequest{Struct: s}) }
}
return AiConnector_connect_Results_Promise{Pipeline: capnp.NewPipeline(c.Client.Call(call))}
}
开发者ID:bcspragu,项目名称:Gobots,代码行数:20,代码来源:botapi.capnp.go
注:本文中的zombiezen/com/go/capnproto2.NewCallOptions函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论