Skip to content

Commit

Permalink
Deprecate more
Browse files Browse the repository at this point in the history
  • Loading branch information
etspaceman committed Dec 1, 2023
1 parent e1febfb commit 79ae804
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/src/main/scala/feral/examples/KinesisLambda.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ package feral.examples
import cats.effect._
import cats.effect.std.Random
import feral.lambda._
import feral.lambda.events.KinesisStreamEvent
import natchez.Trace
import natchez.xray.XRay
import skunk.Session
import feral.lambda.events.SqsEvent

/**
* On Scala.js, implement your Lambda as an `object`. This will be the name your JavaScript
Expand All @@ -38,7 +38,7 @@ import skunk.Session
*
* For a more advanced example, see the `Http4sLambda` next.
*/
object kinesisHandler extends IOLambda.Simple[KinesisStreamEvent, INothing] {
object sqsHandler extends IOLambda.Simple[SqsEvent, INothing] {

/**
* Optional initialization section. This is a resource that will be acquired exactly once when
Expand Down Expand Up @@ -66,7 +66,7 @@ object kinesisHandler extends IOLambda.Simple[KinesisStreamEvent, INothing] {
* @param init
* in this example, the skunk session we setup above
*/
def apply(event: KinesisStreamEvent, context: Context[IO], init: Init) =
def apply(event: SqsEvent, context: Context[IO], init: Init) =
IO.println(s"Received event with ${event.records.size} records").as(None)

}
3 changes: 3 additions & 0 deletions lambda/shared/src/main/scala-2/feral/lambda/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ package object lambda {

type ApiGatewayProxyInvocation[F[_]] = Invocation[F, ApiGatewayProxyEventV2]
type DynamoDbStreamInvocation[F[_]] = Invocation[F, DynamoDbStreamEvent]
@deprecated(
"Moved to kinesis4cats. See https://etspaceman.github.io/kinesis4cats/feral/getting-started.html.",
since = "0.3.0")
type KinesisStreamInvocation[F[_]] = Invocation[F, KinesisStreamEvent]
type S3BatchInvocation[F[_]] = Invocation[F, S3BatchEvent]
type SnsInvocation[F[_]] = Invocation[F, SnsEvent]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ object KinesisStreamRecord {
}
}

@deprecated(
"Moved to kinesis4cats. See https://etspaceman.github.io/kinesis4cats/feral/getting-started.html.",
since = "0.3.0")
sealed abstract class KinesisStreamEvent {
def records: List[KinesisStreamRecord]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ package feral.lambda.events
import io.circe.literal._
import munit.FunSuite

@deprecated(
"Moved to kinesis4cats. See https://etspaceman.github.io/kinesis4cats/feral/getting-started.html.",
since = "0.3.0")
class KinesisStreamEventSuite extends FunSuite {

test("decoder") {
Expand Down

0 comments on commit 79ae804

Please sign in to comment.