api

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 27, 2016 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package api is a generated protocol buffer package.

It is generated from these files:

dfss/dfssd/api/demonstrator.proto

It has these top-level messages:

Log
Ack

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Configure

func Configure(verbswitch, activated bool, addrport, id string)

Configure is used to update current parameters. Call it at least one time before the first DLog call.

func DClose

func DClose()

DClose close the connection with demonstrator server (if any)

This should be called at the end of any program that import this library

func DLog

func DLog(log string)

DLog send a message to the demonstrator

The client is dialed in a lazy way

func RegisterDemonstratorServer

func RegisterDemonstratorServer(s *grpc.Server, srv DemonstratorServer)

func SetIdentifier

func SetIdentifier(id string)

SetIdentifier updates the current client identifier.

Types

type Ack

type Ack struct {
}

/ Acknowledgement message

func (*Ack) Descriptor

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

func (*Ack) ProtoMessage

func (*Ack) ProtoMessage()

func (*Ack) Reset

func (m *Ack) Reset()

func (*Ack) String

func (m *Ack) String() string

type DemonstratorClient

type DemonstratorClient interface {
	// / Send a new log line to the demonstrator
	SendLog(ctx context.Context, in *Log, opts ...grpc.CallOption) (*Ack, error)
}

func NewDemonstratorClient

func NewDemonstratorClient(cc *grpc.ClientConn) DemonstratorClient

type DemonstratorServer

type DemonstratorServer interface {
	// / Send a new log line to the demonstrator
	SendLog(context.Context, *Log) (*Ack, error)
}

type Log

type Log struct {
	// / Unix nano timestamp as absolute time of event
	Timestamp int64 `protobuf:"varint,1,opt,name=timestamp" json:"timestamp,omitempty"`
	// / Identifier of the sender.
	// Should be an email, "platform" or "ttp".
	Identifier string `protobuf:"bytes,2,opt,name=identifier" json:"identifier,omitempty"`
	// / The log message
	Log string `protobuf:"bytes,3,opt,name=log" json:"log,omitempty"`
}

func (*Log) Descriptor

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

func (*Log) ProtoMessage

func (*Log) ProtoMessage()

func (*Log) Reset

func (m *Log) Reset()

func (*Log) String

func (m *Log) String() string

Jump to

Keyboard shortcuts

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