thrifttestserver

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2016 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(impl Interface) thrift.Service

New prepares an implementation of the ThriftTest service for registration.

handler := ThriftTestHandler{}
thrift.Register(dispatcher, thrifttestserver.New(handler))

Types

type Interface

type Interface interface {
	TestBinary(
		ctx context.Context,
		reqMeta yarpc.ReqMeta,
		Thing []byte,
	) ([]byte, yarpc.ResMeta, error)

	TestByte(
		ctx context.Context,
		reqMeta yarpc.ReqMeta,
		Thing *int8,
	) (int8, yarpc.ResMeta, error)

	TestDouble(
		ctx context.Context,
		reqMeta yarpc.ReqMeta,
		Thing *float64,
	) (float64, yarpc.ResMeta, error)

	TestEnum(
		ctx context.Context,
		reqMeta yarpc.ReqMeta,
		Thing *gauntlet.Numberz,
	) (gauntlet.Numberz, yarpc.ResMeta, error)

	TestException(
		ctx context.Context,
		reqMeta yarpc.ReqMeta,
		Arg *string,
	) (yarpc.ResMeta, error)

	TestI32(
		ctx context.Context,
		reqMeta yarpc.ReqMeta,
		Thing *int32,
	) (int32, yarpc.ResMeta, error)

	TestI64(
		ctx context.Context,
		reqMeta yarpc.ReqMeta,
		Thing *int64,
	) (int64, yarpc.ResMeta, error)

	TestInsanity(
		ctx context.Context,
		reqMeta yarpc.ReqMeta,
		Argument *gauntlet.Insanity,
	) (map[gauntlet.UserId]map[gauntlet.Numberz]*gauntlet.Insanity, yarpc.ResMeta, error)

	TestList(
		ctx context.Context,
		reqMeta yarpc.ReqMeta,
		Thing []int32,
	) ([]int32, yarpc.ResMeta, error)

	TestMap(
		ctx context.Context,
		reqMeta yarpc.ReqMeta,
		Thing map[int32]int32,
	) (map[int32]int32, yarpc.ResMeta, error)

	TestMapMap(
		ctx context.Context,
		reqMeta yarpc.ReqMeta,
		Hello *int32,
	) (map[int32]map[int32]int32, yarpc.ResMeta, error)

	TestMulti(
		ctx context.Context,
		reqMeta yarpc.ReqMeta,
		Arg0 *int8,
		Arg1 *int32,
		Arg2 *int64,
		Arg3 map[int16]string,
		Arg4 *gauntlet.Numberz,
		Arg5 *gauntlet.UserId,
	) (*gauntlet.Xtruct, yarpc.ResMeta, error)

	TestMultiException(
		ctx context.Context,
		reqMeta yarpc.ReqMeta,
		Arg0 *string,
		Arg1 *string,
	) (*gauntlet.Xtruct, yarpc.ResMeta, error)

	TestNest(
		ctx context.Context,
		reqMeta yarpc.ReqMeta,
		Thing *gauntlet.Xtruct2,
	) (*gauntlet.Xtruct2, yarpc.ResMeta, error)

	TestSet(
		ctx context.Context,
		reqMeta yarpc.ReqMeta,
		Thing map[int32]struct{},
	) (map[int32]struct{}, yarpc.ResMeta, error)

	TestString(
		ctx context.Context,
		reqMeta yarpc.ReqMeta,
		Thing *string,
	) (string, yarpc.ResMeta, error)

	TestStringMap(
		ctx context.Context,
		reqMeta yarpc.ReqMeta,
		Thing map[string]string,
	) (map[string]string, yarpc.ResMeta, error)

	TestStruct(
		ctx context.Context,
		reqMeta yarpc.ReqMeta,
		Thing *gauntlet.Xtruct,
	) (*gauntlet.Xtruct, yarpc.ResMeta, error)

	TestTypedef(
		ctx context.Context,
		reqMeta yarpc.ReqMeta,
		Thing *gauntlet.UserId,
	) (gauntlet.UserId, yarpc.ResMeta, error)

	TestVoid(
		ctx context.Context,
		reqMeta yarpc.ReqMeta,
	) (yarpc.ResMeta, error)
}

Interface is the server-side interface for the ThriftTest service.

Jump to

Keyboard shortcuts

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