snowflake

package
v0.0.0-...-74704ee Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package snowflake is a generated protocol buffer package.

It is generated from these files:

snowflake.proto

It has these top-level messages:

Key
Value
NullRequest
UUID

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterSnowflakeHandler

func RegisterSnowflakeHandler(s server.Server, hdlr SnowflakeHandler, opts ...server.HandlerOption)

Types

type Key

type Key struct {
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
}

func (*Key) Descriptor

func (*Key) Descriptor() ([]byte, []int)

func (*Key) ProtoMessage

func (*Key) ProtoMessage()

func (*Key) Reset

func (m *Key) Reset()

func (*Key) String

func (m *Key) String() string

type NullRequest

type NullRequest struct {
}

func (*NullRequest) Descriptor

func (*NullRequest) Descriptor() ([]byte, []int)

func (*NullRequest) ProtoMessage

func (*NullRequest) ProtoMessage()

func (*NullRequest) Reset

func (m *NullRequest) Reset()

func (*NullRequest) String

func (m *NullRequest) String() string

type Snowflake

type Snowflake struct {
	SnowflakeHandler
}

func (*Snowflake) GetUUID

func (h *Snowflake) GetUUID(ctx context.Context, in *NullRequest, out *UUID) error

func (*Snowflake) Next

func (h *Snowflake) Next(ctx context.Context, in *Key, out *Value) error

type SnowflakeClient

type SnowflakeClient interface {
	Next(ctx context.Context, in *Key, opts ...client.CallOption) (*Value, error)
	GetUUID(ctx context.Context, in *NullRequest, opts ...client.CallOption) (*UUID, error)
}

func NewSnowflakeClient

func NewSnowflakeClient(serviceName string, c client.Client) SnowflakeClient

type SnowflakeHandler

type SnowflakeHandler interface {
	Next(context.Context, *Key, *Value) error
	GetUUID(context.Context, *NullRequest, *UUID) error
}

type UUID

type UUID struct {
	Uuid uint64 `protobuf:"varint,1,opt,name=uuid" json:"uuid,omitempty"`
}

func (*UUID) Descriptor

func (*UUID) Descriptor() ([]byte, []int)

func (*UUID) ProtoMessage

func (*UUID) ProtoMessage()

func (*UUID) Reset

func (m *UUID) Reset()

func (*UUID) String

func (m *UUID) String() string

type Value

type Value struct {
	Value int64 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"`
}

func (*Value) Descriptor

func (*Value) Descriptor() ([]byte, []int)

func (*Value) ProtoMessage

func (*Value) ProtoMessage()

func (*Value) Reset

func (m *Value) Reset()

func (*Value) String

func (m *Value) String() string

Jump to

Keyboard shortcuts

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