v.io: v.io/x/ref/examples/rps/internal Index | Files

package internal

import "v.io/x/ref/examples/rps/internal"

Package internal defines common functions used by both rock paper scissors clients and servers.

Index

Package Files

auth.go common.go

func CreateName Uses

func CreateName(ctx *context.T) string

CreateName creates a name using the username and hostname.

func FindJudge Uses

func FindJudge(ctx *context.T, prefix string) (string, error)

FindJudge returns a random rock-paper-scissors judge from the mount table.

func FindPlayer Uses

func FindPlayer(ctx *context.T, prefix string) (string, error)

FindPlayer returns a random rock-paper-scissors player from the mount table.

func FindScoreKeepers Uses

func FindScoreKeepers(ctx *context.T, prefix string) ([]string, error)

FindScoreKeepers returns all the rock-paper-scissors score keepers from the mount table.

func FormatScoreCard Uses

func FormatScoreCard(score rps.ScoreCard) string

FormatScoreCard returns a string representation of a score card.

func NewAuthorizer Uses

func NewAuthorizer(fname string) security.Authorizer

Package internal imports 12 packages (graph) and is imported by 9 packages. Updated 2020-06-09. Refresh now. Tools for package owners.