2016-04-25 23:04:32 +02:00
|
|
|
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
|
|
|
|
|
Finish up bindings to most core gRPC functions (#1)
* grpc_server_request_call
* basic slice functionality
* rename function to emphasize side effects
* add docs
* ByteBuffer function bindings
* replace unsafeCoerce with more specific function, add docs, tests.
* add newtypes for Tag and Reserved void pointers
* manually fix request_registered_call binding
* use nocode keyword to fix Ptr () problems
* decouple copying Slice from freeing slice
* Add time ops
* remove nocode decls
* Start Op module, fix c2hs preprocessing order
* metadata manipulation operations
* metadata free function, test
* helper functions for constructing ops of each type
* bindings for op creation functions
* finish up Op creation functions, implement Op destruction, add docs.
* tweak documentation
* rework Op creation functions to work with an array of ops, for ease of use with grpc_call_start_batch
* forgot to change return types
* wrap hook lines, fix types to op creation functions
* implement part of the payload test
* hideous, but working, end to end test
* bindings for connectivity state checks, split test into two threads
* various cleanup
* rename Core to Unsafe for emphasis, clean up tests more
* add requested comment
* remove slice_unref binding, use sliceFree when converting buffer to bytestring
2016-05-13 18:12:37 +02:00
|
|
|
module Network.GRPC.Unsafe.Constants where
|
2015-03-03 09:30:11 +01:00
|
|
|
|
|
|
|
#include "grpc/grpc.h"
|
2016-04-21 01:02:53 +02:00
|
|
|
#include "grpc/impl/codegen/propagation_bits.h"
|
2016-06-22 22:07:38 +02:00
|
|
|
#include "grpc/impl/codegen/compression_types.h"
|
2015-03-03 09:30:11 +01:00
|
|
|
|
2015-03-03 14:42:09 +01:00
|
|
|
argEnableCensus :: Int
|
2015-03-03 09:30:11 +01:00
|
|
|
argEnableCensus = #const GRPC_ARG_ENABLE_CENSUS
|
2015-03-03 14:42:09 +01:00
|
|
|
|
|
|
|
argMaxConcurrentStreams :: Int
|
2015-03-03 09:30:11 +01:00
|
|
|
argMaxConcurrentStreams = #const GRPC_ARG_MAX_CONCURRENT_STREAMS
|
2015-03-03 14:42:09 +01:00
|
|
|
|
|
|
|
argMaxMessageLength :: Int
|
2015-03-03 09:30:11 +01:00
|
|
|
argMaxMessageLength = #const GRPC_ARG_MAX_MESSAGE_LENGTH
|
|
|
|
|
|
|
|
writeBufferHint :: Int
|
|
|
|
writeBufferHint = #const GRPC_WRITE_BUFFER_HINT
|
|
|
|
|
|
|
|
writeNoCompress :: Int
|
|
|
|
writeNoCompress = #const GRPC_WRITE_NO_COMPRESS
|
2016-04-21 01:02:53 +02:00
|
|
|
|
Finish up bindings to most core gRPC functions (#1)
* grpc_server_request_call
* basic slice functionality
* rename function to emphasize side effects
* add docs
* ByteBuffer function bindings
* replace unsafeCoerce with more specific function, add docs, tests.
* add newtypes for Tag and Reserved void pointers
* manually fix request_registered_call binding
* use nocode keyword to fix Ptr () problems
* decouple copying Slice from freeing slice
* Add time ops
* remove nocode decls
* Start Op module, fix c2hs preprocessing order
* metadata manipulation operations
* metadata free function, test
* helper functions for constructing ops of each type
* bindings for op creation functions
* finish up Op creation functions, implement Op destruction, add docs.
* tweak documentation
* rework Op creation functions to work with an array of ops, for ease of use with grpc_call_start_batch
* forgot to change return types
* wrap hook lines, fix types to op creation functions
* implement part of the payload test
* hideous, but working, end to end test
* bindings for connectivity state checks, split test into two threads
* various cleanup
* rename Core to Unsafe for emphasis, clean up tests more
* add requested comment
* remove slice_unref binding, use sliceFree when converting buffer to bytestring
2016-05-13 18:12:37 +02:00
|
|
|
maxCompletionQueuePluckers :: Int
|
|
|
|
maxCompletionQueuePluckers = #const GRPC_MAX_COMPLETION_QUEUE_PLUCKERS
|
|
|
|
|
2016-04-21 01:02:53 +02:00
|
|
|
newtype PropagationMask = PropagationMask {unPropagationMask :: Int}
|
2016-04-25 23:04:32 +02:00
|
|
|
deriving (Show, Eq, Ord, Integral, Enum, Real, Num)
|
2016-04-21 01:02:53 +02:00
|
|
|
|
2016-04-25 23:04:32 +02:00
|
|
|
propagateDeadline :: PropagationMask
|
|
|
|
propagateDeadline = PropagationMask $ #const GRPC_PROPAGATE_DEADLINE
|
2016-04-21 01:02:53 +02:00
|
|
|
|
2016-04-25 23:04:32 +02:00
|
|
|
propagateCensusStatsContext :: PropagationMask
|
|
|
|
propagateCensusStatsContext =
|
|
|
|
PropagationMask $ #const GRPC_PROPAGATE_CENSUS_STATS_CONTEXT
|
2016-04-21 01:02:53 +02:00
|
|
|
|
2016-04-25 23:04:32 +02:00
|
|
|
propagateCensusTracingContext :: PropagationMask
|
|
|
|
propagateCensusTracingContext =
|
|
|
|
PropagationMask $ #const GRPC_PROPAGATE_CENSUS_TRACING_CONTEXT
|
2016-04-21 01:02:53 +02:00
|
|
|
|
2016-04-25 23:04:32 +02:00
|
|
|
propagateCancellation :: PropagationMask
|
|
|
|
propagateCancellation =
|
|
|
|
PropagationMask $ #const GRPC_PROPAGATE_CANCELLATION
|
Finish up bindings to most core gRPC functions (#1)
* grpc_server_request_call
* basic slice functionality
* rename function to emphasize side effects
* add docs
* ByteBuffer function bindings
* replace unsafeCoerce with more specific function, add docs, tests.
* add newtypes for Tag and Reserved void pointers
* manually fix request_registered_call binding
* use nocode keyword to fix Ptr () problems
* decouple copying Slice from freeing slice
* Add time ops
* remove nocode decls
* Start Op module, fix c2hs preprocessing order
* metadata manipulation operations
* metadata free function, test
* helper functions for constructing ops of each type
* bindings for op creation functions
* finish up Op creation functions, implement Op destruction, add docs.
* tweak documentation
* rework Op creation functions to work with an array of ops, for ease of use with grpc_call_start_batch
* forgot to change return types
* wrap hook lines, fix types to op creation functions
* implement part of the payload test
* hideous, but working, end to end test
* bindings for connectivity state checks, split test into two threads
* various cleanup
* rename Core to Unsafe for emphasis, clean up tests more
* add requested comment
* remove slice_unref binding, use sliceFree when converting buffer to bytestring
2016-05-13 18:12:37 +02:00
|
|
|
|
|
|
|
propagateDefaults :: PropagationMask
|
|
|
|
propagateDefaults = PropagationMask $ #const GRPC_PROPAGATE_DEFAULTS
|