util

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package util provides utility structs and methods for Open Match.

Package util provides utilities for net.Listener.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendSynchronizerContextID added in v0.8.0

func AppendSynchronizerContextID(ctx context.Context, id string) (context.Context, error)

AppendSynchronizerContextID adds the synchronizer context id to a request context metadata.

func GetSynchronizerContextID added in v0.8.0

func GetSynchronizerContextID(ctx context.Context) string

GetSynchronizerContextID returns the synchronizer context id from the context metadata.

Types

type MultiClose

type MultiClose struct {
	// contains filtered or unexported fields
}

MultiClose is a helper for closing multiple close functions at the end of a program.

func NewMultiClose

func NewMultiClose() *MultiClose

NewMultiClose creates a new multi-closer.

func (*MultiClose) AddCloseFunc

func (mc *MultiClose) AddCloseFunc(closer func())

AddCloseFunc adds a close function.

func (*MultiClose) AddCloseWithErrorFunc

func (mc *MultiClose) AddCloseWithErrorFunc(closer func() error)

AddCloseWithErrorFunc adds a close function.

func (*MultiClose) Close

func (mc *MultiClose) Close()

Close shutsdown the server and frees the TCP port.

Directories

Path Synopsis
Package testing provides utility methods for testing.
Package testing provides utility methods for testing.

Jump to

Keyboard shortcuts

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