tasks

package
v0.0.0-...-3763b7f Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2017 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsPalindrom

func IsPalindrom(value int) bool

func RegisterArith

func RegisterArith(s *rpc.Server)

RegisterArith is a simple function to register Arith structure as a RPC endpoint.

func RegisterPalindrom

func RegisterPalindrom(s *rpc.Server)

RegisterPalindrom registers interface in RPC handlers.

Types

type Arith

type Arith int

Arith overrides "int"

func (*Arith) Sum

func (a *Arith) Sum(args *[]int, reply *int) error

Sum makes a sum of the whole intgers given as argument. It saves reponse in reply.

type Palindrom

type Palindrom int

func (*Palindrom) Check

func (p *Palindrom) Check(v *int, r *bool) error

Check if int "v" is binary palindrom.

func (*Palindrom) CheckN

func (p *Palindrom) CheckN(v *Range, c *int) error

CheckN count the binary palindrom in a giver Range.

type Range

type Range struct {
	Start int
	End   int
}

Jump to

Keyboard shortcuts

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