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 ¶
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) ProtoMessage ¶
func (*Ack) ProtoMessage()
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 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) ProtoMessage ¶
func (*Log) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.